Date and Timezones
Time stamps
In the Nitrobox System dates change at midnight UTC (12:00 AM), which is considered to be the beginning of the day.
Using dates and date times
Nitrobox supports the following date time formatting conventions:
Formatting Convention | Example | |
---|---|---|
With Offset | YYYY-MM-DDTHH:MM:SS[+ -]HH:MM | 2015-03-08T02:00:00+08:00 |
Without Offset | YYYY-MM-DDTHH:MM:SSZ | 2015-03-08T02:00:00Z |
Date values
For representing date values Nitrobox sticks to the ISO-8601 formats. Both in the date only version (e.g. for date of birth) or date with time version (e.g. exact time of a payment creation).
Date without time:
Example: 2020-05-17
YYYY-MM-DD
Date with time:
YYYY-MM-DDThh:mm:ssTZ
Details:
- the hour is specified in a 24-hour format
- “T” demarcates date and time parts
- “TZ” stands for a timezone or an offset and can consist of:
- the letter “Z” - for UTC time (“Zulu” time)
- ±hh:mm - for an hours-minutes offset
Examples of a correct date-time in this format:
- 2020-05-17T04:13:27Z
- 2020-05-17T14:13:27+02:00
- 2020-05-17T22:13:27-05:00
Those will be returned as:
- 2020-05-17T04:13:27Z
- 2020-05-17T14:13:27+02:00
- 2020-05-17T22:13:27-05:00
Only the following fields accept and return an offset:
- usages.startDate + endDate
- billableItem.itemPeriodStart + itemPeriodEnd
- contractItem.startDate + endDate
- purchaseItem.periodStartDate + periodEndDate
Updated about 1 year ago