Hi,
Surely that is evidence that Windows is storing timestamps in UTC? If it wasnt then a file stamped as 3pm would always say 3pm no matter what timezone you changed your computer to. Regards, David. From: [email protected] [mailto:[email protected]] On Behalf Of Rohit Gupta Sent: Friday, 25 November 2016 9:59 a.m. To: NZ Borland Developers Group - Delphi List <[email protected]> Subject: Re: [DUG] Timezones for Bills and things Thanks Ross, however I would dispute that windows stores file timestamps in utc. Because twice a year there is mayhem as only some files change their timestamp by an hour. And these files are different on different workstations. Maybe it's true for the server version of windows. Rohit On 24/11/2016 17:39, Ross Levis wrote: I suggest store in UTC, like Windows does for file timestamps, and use Windows functions like GetTimeZoneInformation and SystemTimeToTzSpecificLocalTime to convert to locale time for display/printing purposes. A timezone database shouldnt be required. From: [email protected] <mailto:[email protected]> [mailto:[email protected]] On Behalf Of Stefan Mueller Sent: Thursday, 24 November 2016 5:21 p.m. To: 'NZ Borland Developers Group - Delphi List' Subject: Re: [DUG] Timezones for Bills and things 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]> [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] <mailto:[email protected]> Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to [email protected] <mailto:[email protected]> with Subject: unsubscribe -- Regards Rohit Gupta B.E. Elec., M.E., Mem IEEE, Mem IET Technical Director Computer Fanatics Ltd Tel 4892280 Fax 4892290 Web www.cfl.co.nz _____ This email and any attachments contain information, which is confidential and may be subject to legal privilege and copyright. If you are not the intended recipient, you must not use, distribute or copy this email or attachments. If you have received this in error, please notify us immediately by return email and then delete this email and any attachments.
_______________________________________________ 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
