<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Thanks Ross,<br>
      <br>
      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.<br>
      <br>
      Maybe it's true for the server version of windows.<br>
      <br>
      Rohit<br>
      <br>
      <br>
      On 24/11/2016 17:39, Ross Levis wrote:<br>
    </div>
    <blockquote cite="mid:008401d2460c$bde2b970$39a82c50$@com"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=windows-1252">
      <meta name="Generator" content="Microsoft Word 12 (filtered
        medium)">
      <style><!--
/* Font Definitions */
@font-face
        {font-family:SimSun;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 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:"\@SimSun";
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@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;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";
        color:black;}
span.EmailStyle17
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";
        color:black;}
.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;}
@list l0:level1
        {mso-level-tab-stop:36.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level2
        {mso-level-tab-stop:72.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level3
        {mso-level-tab-stop:108.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level4
        {mso-level-tab-stop:144.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level5
        {mso-level-tab-stop:180.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level6
        {mso-level-tab-stop:216.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level7
        {mso-level-tab-stop:252.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level8
        {mso-level-tab-stop:288.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level9
        {mso-level-tab-stop:324.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l1
        {mso-list-id:1265110206;
        mso-list-template-ids:531690312;}
@list l1:level1
        {mso-level-tab-stop:36.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
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]-->
      <div class="WordSection1">
        <p class="MsoNormal"><span
style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">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
            shouldn’t be required.<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p> </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:&quot;Tahoma&quot;,&quot;sans-serif&quot;;color:windowtext"
                  lang="EN-US">From:</span></b><span
style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;;color:windowtext"
                lang="EN-US"> <a class="moz-txt-link-abbreviated" href="mailto:delphi-bounces@listserver.123.net.nz">delphi-bounces@listserver.123.net.nz</a>
                [<a class="moz-txt-link-freetext" href="mailto:delphi-bounces@listserver.123.net.nz">mailto:delphi-bounces@listserver.123.net.nz</a>] <b>On
                  Behalf Of </b>Stefan Mueller<br>
                <b>Sent:</b> Thursday, 24 November 2016 5:21 p.m.<br>
                <b>To:</b> 'NZ Borland Developers Group - Delphi List'<br>
                <b>Subject:</b> Re: [DUG] Timezones for Bills and things<o:p></o:p></span></p>
          </div>
        </div>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"
            lang="EN-US"><a moz-do-not-send="true"
              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:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"
            lang="EN-US">I think <a moz-do-not-send="true"
              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:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"
            lang="EN-US"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"
            lang="EN-US">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.<o:p></o:p></span></p>
        <div>
          <p class="MsoNormal"><span
style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;"
              lang="EN-US"><a moz-do-not-send="true"
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" style="margin-bottom:12.0pt"><span
style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:#1F497D"
              lang="EN-US"><o:p> </o:p></span></p>
          <p class="MsoNormal" style="margin-bottom:12.0pt"><span
style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;"
              lang="EN-US">Kind regards,</span><span
style="font-size:10.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"
              lang="EN-US"><o:p></o:p></span></p>
          <p class="MsoNormal"><b><span
style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;"
                lang="EN-US">Stefan Müller</span></b><span
style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;"
              lang="EN-US">,<br>
              R&amp;D Manager</span><span
style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:#1F497D"
              lang="EN-US"><br>
              <br>
            </span><b><span
style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:white;background:red"
                lang="EN-US">ORCL</span></b><span
style="font-size:10.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"
              lang="EN-US"> </span><b><span
style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;"
                lang="EN-US">Toolbox Ltd.</span></b><span
style="font-size:10.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"
              lang="EN-US"> <br>
            </span><span
style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;"
              lang="EN-US">Auckland, New Zealand</span><span
style="font-size:10.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"
              lang="EN-US"> <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"
              lang="EN-US"><br>
              P</span><span
style="font-size:9.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:#777777"
              lang="EN-US"> 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:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"
            lang="EN-US"><o:p> </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:&quot;Tahoma&quot;,&quot;sans-serif&quot;;color:windowtext"
                  lang="EN-US">From:</span></b><span
style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;;color:windowtext"
                lang="EN-US"> <a moz-do-not-send="true"
                  href="mailto:delphi-bounces@listserver.123.net.nz">delphi-bounces@listserver.123.net.nz</a>
                [<a moz-do-not-send="true"
                  href="mailto:delphi-bounces@listserver.123.net.nz">mailto:delphi-bounces@listserver.123.net.nz</a>]
                <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"><span lang="EN-US"><o:p> </o:p></span></p>
        <p class="MsoNormal" style="margin-bottom:12.0pt"><span
            lang="EN-US">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.<br>
            <br>
            Going forward, a database server could be servicing
            workstations in different time zones.<br>
            <br>
            I am considering<o:p></o:p></span></p>
        <ol start="1" type="1">
          <li class="MsoNormal"
            style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;mso-list:l0
            level1 lfo3"><span lang="EN-US">Set the server time as UTC<o:p></o:p></span></li>
          <li class="MsoNormal"
            style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;mso-list:l0
            level1 lfo3"><span lang="EN-US">Keep a table for time zone
              versus branch (how do I keep this upto date at daylight
              saving boundaries)<o:p></o:p></span></li>
          <li class="MsoNormal"
            style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;mso-list:l0
            level1 lfo3"><span lang="EN-US">Use the utc + timezone
              difference to stamp each bill or appointment made for each
              branch.<o:p></o:p></span></li>
        </ol>
        <p class="MsoNormal"><span lang="EN-US">How is everyone else
            handling it ?<br>
            <br>
            Regards<br>
            <br>
            Rohit<o:p></o:p></span></p>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
NZ Borland Developers Group - Delphi mailing list
Post: <a class="moz-txt-link-abbreviated" href="mailto:delphi@listserver.123.net.nz">delphi@listserver.123.net.nz</a>
Admin: <a class="moz-txt-link-freetext" href="http://delphi.org.nz/mailman/listinfo/delphi">http://delphi.org.nz/mailman/listinfo/delphi</a>
Unsubscribe: send an email to <a class="moz-txt-link-abbreviated" href="mailto:delphi-request@listserver.123.net.nz">delphi-request@listserver.123.net.nz</a> with Subject: unsubscribe</pre>
    </blockquote>
    <p><br>
    </p>
    <div class="moz-signature">-- <br>
      <p>
        Regards<br>
        <br>
        <b>Rohit Gupta</b><br>
        B.E. Elec., M.E., Mem IEEE, Mem IET<br>
        Technical Director<br>
        Computer Fanatics Ltd<br>
        <br>
        <b>Tel </b>4892280 <br>
        <b>Fax </b>4892290 <br>
        <b>Web </b><a href="www.cfl.co.nz">www.cfl.co.nz</a><br>
      </p>
      <hr>
      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.</div>
  </body>
</html>