oneapi
Sign in
Utile v1 / Timp

Convert between zones

The same moment read in another time zone — with the offset between them and a warning when the given hour falls in the spring gap or the doubled autumn hour.

GET
https://oneapi.ro/api/utile/v1/timp/converteste

Query parameters

NameTypeDescriptionAccepted values
dinrequired string REQUIRED. The zone the moment is expressed in. max 64 car.
inrequired string REQUIRED. The zone you want the result in. max 64 car.
momentoptional string | null The moment, as 2026-12-24 18:00 or ISO 8601. Without it, NOW is converted. max 40 car.

How it behaves

  • The hour difference is given explicitly, as a number. It is the real question ("how much earlier is it there?"), and subtracting two offsets is exactly where the sign gets flipped.
  • The conversion is correct across daylight-saving transitions, because the offset is read for the GIVEN moment, not for today. A summer moment converted in December yields a different gap than the same moment converted in July — correct, not an inconsistency.
  • Beware of moments that do not exist: at the spring transition, 03:00 on 29 March 2026 does not exist in Bucharest. PHP moves it forward; the result is a valid time, but not the one written in the request.

What it is for

  • Schedule a meeting with participants in three countries and get each one's local time.
  • Translate a moment received from a partner into your local time, correctly even on the day the clocks change.
  • Check what local time a job scheduled in UTC actually runs at.

Response structure

All fields below live inside data.

FieldTypeDescription
sursa.zona string The zone the value refers to.
sursa.moment string The moment as interpreted in the source zone.
sursa.offset string Which record the response starts at.
sursa.ora_de_vara boolean Whether daylight saving time is in force at the requested moment.
tinta.zona string The zone the value refers to.
tinta.moment string The same moment in the destination zone.
tinta.offset string Which record the response starts at.
tinta.ora_de_vara boolean Whether daylight saving time is in force at the requested moment.
utc string The moment in UTC — the anchor tying the two together.
diferenta_ore integer The gap between the zones, in hours. Negative means the destination is behind.

Response examples

GEThttps://oneapi.ro/api/utile/v1/timp/converteste?din=Europe/Bucharest&in=UTC
{
    "data": {
        "sursa": {
            "zona": "Europe/Bucharest",
            "moment": "2026-10-06T23: 39: 54+03: 00",
            "offset": "+03: 00",
            "ora_de_vara": true
        },
        "tinta": {
            "zona": "UTC",
            "moment": "2026-10-06T20: 39: 54+00: 00",
            "offset": "+00: 00",
            "ora_de_vara": false
        },
        "utc": "2026-10-06T20: 39: 54+00: 00",
        "diferenta_ore": -3
    }
}

Error codes

CodeSlugWhen it occurs
401neautentificatToken missing, invalid, expired or revoked.
403feature_indisponibilThe current plan does not include the feature the route depends on.
422validareOne of the zones does not exist, or the moment cannot be parsed.
429cota_depasitaThe plan's monthly quota has been exceeded (see Retry-After).

All errors share the same shape. eroare.cod is stable and is the value you should branch on in code — not the text in mesaj, which may change.

{
    "eroare": {
        "cod": "validare",
        "mesaj": "One of the zones does not exist, or the moment cannot be parsed.",
        "detalii": {
            "din": [
                "The value sent does not satisfy the parameter rule."
            ]
        }
    }
}