Whilst implementing our API, the issue of datetime and timezones came up.All dates are normalized to UTC in the database. Currently, in the non-API application, all datetimes are converted based on users preferences first before presented.Now the same question came up for the API: should the the API be able to return the datetime appropriate for a timezone based on request semantics?E.g. GET /posts?timezone=America/Sao_Paulo ?Or should it still be done on whatever client is accessing the API?Update: since it came up a few times: currently timestamps with timezone are returned (although it's always TZ offset +00:00). The format is the popular 8601: 2015-10-29T23:00:49+00:00
Should a REST API be able to convert datetime to appropriate clients timezone?
rest;api;time