https://github.com/pavkam/tzdb has such a timezone database (2014 data). Using that library makes it easy to convert between timezones.
I think http://www.iana.org/time-zones hosts the latest up to date time zone data that this tzdb database is based on in case you want to update it to the latest 2016 data. Or you could rewrite your application to use Oracle Database they do have a timestamp datatype for your table columns so when you select/insert/update a table all you need to do is to set the correct locale and the database will do the conversion for you. https://docs.oracle.com/database/121/NLSPG/ch4datetime.htm#NLSPG263 Kind regards, Stefan Müller, R&D Manager ORCL Toolbox Ltd. Auckland, New Zealand P Please consider the environment before printing this email This message is intended for the adresse named above and may contain privileged or confidential information. If you are not the intended recipient of this message you must not use, copy, distribute or disclose it to anyone. From: [email protected] [mailto:[email protected]] On Behalf Of Rohit Gupta Sent: Thursday, 24 November 2016 4:19 p.m. To: NZ Borland Developers Group - Delphi List Subject: [DUG] Timezones for Bills and things We finally have to deal with time zones. We use the server date-time everywhere, rather than relying on workstation date-times. This is not an interactive forum type application where the flow of data is merged from various timezones. It is a business management system with appointments and bills etc. The timestamps of these records have to remain as created. But they can not come from the workstation clock. Going forward, a database server could be servicing workstations in different time zones. I am considering 1. Set the server time as UTC 2. Keep a table for time zone versus branch (how do I keep this upto date at daylight saving boundaries) 3. Use the utc + timezone difference to stamp each bill or appointment made for each branch. How is everyone else handling it ? Regards Rohit
_______________________________________________ NZ Borland Developers Group - Delphi mailing list Post: [email protected] Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to [email protected] with Subject: unsubscribe
