Datetimes and Timezones
Datetimes are stored in our database in UTC. Those values will be shown in API responses according to the user's timezone setting.
You can confirm a user's timezone setting by visiting https://secure.fleetio.com/users/edit when logged in as that user.
Using date filters and specifying a timezone will work around this setting.
Creating Records
You can send datetime values as UTC, or adjust the value with a specific timezone offset. This is also how you would account for daylight savings time. If no offset is provided, the API will assume the value is in the user's timezone.
created_at and updated_at
created_at
and updated_at
are automatically generated by our application. They cannot be modified by users. These values are stored in UTC and will be shown in API responses according to the user's timezone setting.
For example, if a user is set to GMT -05:00 Eastern Time, and creates a record at 11:30 AM local time on May 21st, 2024, the created_at
value will be stored as "2024-05-21T16:30:00"
, and shown as "2024-05-21T11:30:00-05:00"
in API responses requested using the same user's API key.
Daylight Savings Time
The API takes daylight savings time into account. If a user is set to GMT -05:00 Eastern Time, the timezone offset of datetime values in API responses will be -04:00 during daylight savings time.
For example, if you create a record with "2024-05-21T11:30:00Z"
, and the user's timezone is set to GMT -05:00 Eastern Time, that datetime value will be "2024-05-21T06:30:00-05:00"
in API responses, or "2024-05-21T07:30:00-04:00"
during daylight savings time.
Similarly, if you create a record with "2024-05-21T08:32:00-03:00"
, it will be stored as "2024-05-21T11:32:00"
, and shown to the user as "2024-05-21T06:32:00-05:00"
if they are set to GMT -05:00 Eastern Time, or "2024-05-21T07:32:00-04:00"
during daylight savings time.