[clue] time server question

Andrew Diederich andrewdied at gmail.com
Fri Nov 2 08:38:06 MDT 2012


On Fri, Nov 2, 2012 at 8:13 AM, <dennisjperkins at comcast.net> wrote:

> This question concerns Windows, but maybe someone in the group knows the
> answer.
>
> My company's product runs on a Windows server.  Some customers want to use
> a time server to keep our system synchronized on their networks.  The
> problem is that EPA regulations prohibit participating in the spring and
> fall time changes.  The reason is that the spring change puts a one-hour
> gap in the data and the fall change forces overwriting an hour's worth of
> data.  Is it possible to set up the time server and the server that our
> software is running on to keep the computer in sync but not do these two
> time changes?
>

Windows normally puts both the OS and hardware clock in local time, and
daylight savings resets both clocks. UNIX normally(ish) puts the hardware
clock on GMT, and the OS reports whatever local time you want. Or I've been
places that use GMT for everything.

All that said, it sounds like you store the data in your database in local
time, rather than GMT and perform the adjustment in software. If you store
it in GMT the server can do what it wants, as long as you can determine
what the timezone is set to. You may be able to fake the funk by doing
database queries by time, then sort by database index, but that's a little
ugly, and you'd have to figure out how to display the data.

Other methods, though cleaner, probably involve database schema changes.
Include the time offset from GMT, for example. But if you're storing the
time without any time offset, you'll overwrite data even if you run into
problems like the time server going down and the local clock drifting, then
getting reset correctly.

-- 
Andrew Diederich
andrewdied at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://cluedenver.org/pipermail/clue/attachments/20121102/57d273fb/attachment.html 


More information about the clue mailing list