[fpc-pascal] Zoned date/time conversions

Graeme Geldenhuys mailinglists at geldenhuys.co.uk
Sun May 24 13:26:17 CEST 2020


I need to do timezone enabled date/time conversions...

Use case 1)
We want the application server to always use UCT and the application
server might not be in the sime timezone as the client app. So we need
to convert local time to UCT, do some time based processing on the
server, then return data and convert all times back to the local time.

Use case 2)
Client's home address is in Spain. The application server is hosted in
London. The client is on holiday in Australia. They book a grocery
delivery while on holiday, and it must be delivered at 4pm the day
they return from their holiday. So 4pm will be local Spainish time.

Data will be transported to/from the application server using JSON
and REST API. So date/time info needs to be converted to/from string

What classes or methods are available in FPC to convert local
date/time to UCT based time with offset and zone information?


More information about the fpc-pascal mailing list