<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=iso-8859-1"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"MS Mincho";
        panose-1:2 2 6 9 4 2 5 8 3 4;}
@font-face
        {font-family:"MS Mincho";
        panose-1:2 2 6 9 4 2 5 8 3 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:"\@MS Mincho";
        panose-1:2 2 6 9 4 2 5 8 3 4;}
@font-face
        {font-family:Webdings;
        panose-1:5 3 1 2 1 5 9 6 7 3;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";
        color:black;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:1126506024;
        mso-list-template-ids:1009803512;}
ol
        {margin-bottom:0cm;}
ul
        {margin-bottom:0cm;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body bgcolor=white lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><a href="https://github.com/pavkam/tzdb">https://github.com/pavkam/tzdb</a> has such a timezone database (2014 data). Using that library makes it easy to convert between timezones.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>I think <a href="http://www.iana.org/time-zones">http://www.iana.org/time-zones</a> 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. <o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Or you could rewrite your application to use Oracle Database &#8230; 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.<o:p></o:p></span></p><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'><a href="https://docs.oracle.com/database/121/NLSPG/ch4datetime.htm#NLSPG263">https://docs.oracle.com/database/121/NLSPG/ch4datetime.htm#NLSPG263</a><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'><br><br></span><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:#1F497D'><o:p></o:p></span></p><p class=MsoNormal style='margin-bottom:12.0pt'><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:black'>Kind regards,<br><br></span><span style='font-size:10.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p></o:p></span></p><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:black'>Stefan Müller</span></b><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:black'>,<br>R&amp;D Manager</span><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:#1F497D'><br><br></span><b><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:white;background:red'>ORCL</span></b><span style='font-size:10.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><b><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>Toolbox Ltd.</span></b><span style='font-size:10.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> <br></span><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:black'>Auckland, New Zealand</span><span style='font-size:10.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> <o:p></o:p></span></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:9.0pt;font-family:Webdings;color:#777777'><br>P</span><span style='font-size:9.0pt;font-family:"Arial","sans-serif";color:#777777'>&nbsp;Please consider the environment before printing this email<br><br>This message is intended for the adresse named above and may contain privileged or confidential information.<br>If you are not the intended recipient of this message you must not use, copy, distribute or disclose it to anyone.<o:p></o:p></span></p></div><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext'> delphi-bounces@listserver.123.net.nz [mailto:delphi-bounces@listserver.123.net.nz] <b>On Behalf Of </b>Rohit Gupta<br><b>Sent:</b> Thursday, 24 November 2016 4:19 p.m.<br><b>To:</b> NZ Borland Developers Group - Delphi List<br><b>Subject:</b> [DUG] Timezones for Bills and things<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal style='margin-bottom:12.0pt'>We finally have to deal with time zones.&nbsp; We use the server date-time everywhere, rather than relying on workstation date-times.&nbsp; This is not an interactive forum type application where the flow of data is merged from various timezones.&nbsp; It is a business management system with appointments and bills etc.&nbsp; The timestamps of these records have to remain as created.&nbsp; But they can not come from the workstation clock.<br><br>Going forward, a database server could be servicing workstations in different time zones.<br><br>I am considering<o:p></o:p></p><ol start=1 type=1><li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;mso-list:l0 level1 lfo1'>Set the server time as UTC<o:p></o:p></li><li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;mso-list:l0 level1 lfo1'>Keep a table for time zone versus branch (how do I keep this upto date at daylight saving boundaries)<o:p></o:p></li><li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;mso-list:l0 level1 lfo1'>Use the utc + timezone difference to stamp each bill or appointment made for each branch.<o:p></o:p></li></ol><p class=MsoNormal>How is everyone else handling it ?<br><br>Regards<br><br>Rohit<o:p></o:p></p></div></body></html>