<div dir="ltr">It varies according to the _file_system_, not the edition/version of Windows:<br><br>For NTFS volumes, file timestamps are stored in UTC<div><div>For FAT volumes (incl. FAT32, extFAT etc) file timestamps are stored in local time.</div></div><div><br></div><div><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms724290(v=vs.85).aspx">https://msdn.microsoft.com/en-us/library/windows/desktop/ms724290(v=vs.85).aspx</a><br></div><div><br></div><div>But all of this is about file time stamp storage and has nothing to do with how date times should be stored in a database (other than the fact that the NTFS file system stores date/times in UTC and converts them to local time for display, which in general terms is the advisable way to go about things).</div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 25 November 2016 at 09:59, Rohit Gupta <span dir="ltr"><<a href="mailto:rohit@cfl.co.nz" target="_blank">rohit@cfl.co.nz</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
<div class="m_1489603557456339389moz-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 type="cite">
<div class="m_1489603557456339389WordSection1">
<p class="MsoNormal"><span style="font-family:"Calibri","sans-serif";color:#1f497d">I
suggest store in UTC, like Windows does for file timestamps,
and use Windows functions like GetTimeZoneInformation and
SystemTimeToTzSpecificLocalTim<wbr>e to convert to locale time
for display/printing purposes. A timezone database
shouldn’t be required.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></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" lang="EN-US">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext" lang="EN-US"> <a class="m_1489603557456339389moz-txt-link-abbreviated" href="mailto:delphi-bounces@listserver.123.net.nz" target="_blank">delphi-bounces@listserver.123.<wbr>net.nz</a>
[<a class="m_1489603557456339389moz-txt-link-freetext" href="mailto:delphi-bounces@listserver.123.net.nz" target="_blank">mailto:delphi-bounces@<wbr>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<u></u><u></u></span></p>
</div>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-US"><a href="https://github.com/pavkam/tzdb" target="_blank">https://github.com/pavkam/tzdb</a>
has such a timezone database (2014 data). Using that library
makes it easy to convert between timezones.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-US">I think <a href="http://www.iana.org/time-zones" target="_blank">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. <u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";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.<u></u><u></u></span></p>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif"" lang="EN-US"><a href="https://docs.oracle.com/database/121/NLSPG/ch4datetime.htm#NLSPG263" target="_blank">https://docs.oracle.com/<wbr>database/121/NLSPG/<wbr>ch4datetime.htm#NLSPG263</a><u></u><u></u></span></p>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#1f497d" lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span style="font-size:10.0pt;font-family:"Arial","sans-serif"" lang="EN-US">Kind regards,</span><span style="font-size:10.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Arial","sans-serif"" lang="EN-US">Stefan Müller</span></b><span style="font-size:10.0pt;font-family:"Arial","sans-serif"" lang="EN-US">,<br>
R&D Manager</span><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#1f497d" lang="EN-US"><br>
<br>
</span><b><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:white;background:red" lang="EN-US">ORCL</span></b><span style="font-size:10.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-US"> </span><b><span style="font-size:10.0pt;font-family:"Arial","sans-serif"" lang="EN-US">Toolbox Ltd.</span></b><span style="font-size:10.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-US"> <br>
</span><span style="font-size:10.0pt;font-family:"Arial","sans-serif"" lang="EN-US">Auckland, New Zealand</span><span style="font-size:10.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-US"> <u></u><u></u></span></p>
<p class="MsoNormal"><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:"Arial","sans-serif";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.<u></u><u></u></span></p>
</div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-US"><u></u> <u></u></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" lang="EN-US">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext" lang="EN-US"> <a href="mailto:delphi-bounces@listserver.123.net.nz" target="_blank">delphi-bounces@listserver.123.<wbr>net.nz</a>
[<a href="mailto:delphi-bounces@listserver.123.net.nz" target="_blank">mailto:delphi-bounces@<wbr>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<u></u><u></u></span></p>
</div>
</div>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></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<u></u><u></u></span></p>
<ol start="1" type="1">
<li class="MsoNormal"><span lang="EN-US">Set the server time as UTC<u></u><u></u></span></li>
<li class="MsoNormal"><span lang="EN-US">Keep a table for time zone
versus branch (how do I keep this upto date at daylight
saving boundaries)<u></u><u></u></span></li>
<li class="MsoNormal"><span lang="EN-US">Use the utc + timezone
difference to stamp each bill or appointment made for each
branch.<u></u><u></u></span></li>
</ol>
<p class="MsoNormal"><span lang="EN-US">How is everyone else
handling it ?<br>
<br>
Regards<br>
<br>
Rohit<u></u><u></u></span></p>
</div>
<br>
<fieldset class="m_1489603557456339389mimeAttachmentHeader"></fieldset>
<br>
<pre>______________________________<wbr>_________________
NZ Borland Developers Group - Delphi mailing list
Post: <a class="m_1489603557456339389moz-txt-link-abbreviated" href="mailto:delphi@listserver.123.net.nz" target="_blank">delphi@listserver.123.net.nz</a>
Admin: <a class="m_1489603557456339389moz-txt-link-freetext" href="http://delphi.org.nz/mailman/listinfo/delphi" target="_blank">http://delphi.org.nz/mailman/<wbr>listinfo/delphi</a>
Unsubscribe: send an email to <a class="m_1489603557456339389moz-txt-link-abbreviated" href="mailto:delphi-request@listserver.123.net.nz" target="_blank">delphi-request@listserver.123.<wbr>net.nz</a> with Subject: unsubscribe</pre>
</blockquote>
<p><br>
</p>
<div class="m_1489603557456339389moz-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="http://www.cfl.co.nz" target="_blank">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>
</div>
<br>______________________________<wbr>_________________<br>
NZ Borland Developers Group - Delphi mailing list<br>
Post: <a href="mailto:delphi@listserver.123.net.nz">delphi@listserver.123.net.nz</a><br>
Admin: <a href="http://delphi.org.nz/mailman/listinfo/delphi" rel="noreferrer" target="_blank">http://delphi.org.nz/mailman/<wbr>listinfo/delphi</a><br>
Unsubscribe: send an email to <a href="mailto:delphi-request@listserver.123.net.nz">delphi-request@listserver.123.<wbr>net.nz</a> with Subject: unsubscribe<br></blockquote></div><br></div>