[time-nuts] How best to compute local time from GPS
Morris Odell
vilgotch at bigpond.net.au
Tue Mar 25 07:00:38 UTC 2008
David Forbes asked:
>> 2. If I have to store the time zone from the user's input, are the
>> DST calculations reasonably straightforward these days?
It's not too difficult and you get a nice refresher in modulo-7 arithmetic.
I did it in AVR assembler recently although I didn't try to make it
universal. Our government down here in south-eastern Australia recently
changed the DST changeover dates so I customised it for where I live. If you
need to make it user settable that would mean you need to be able to enter
the dates and UTC offsets as a menu item which would complicate things
considerably. It'd be a fun programming challenge though :-)
>> 4. In general, is it better to let the user turn DST on and off or
>> try to do it automatically? (I live in Arizona, which doesn't worship
>> DST, so I have no experience in this matter.)
I put a 3 position (centre off) switch on the back panel of my clock. The 3
positions are: Summer time, Auto, Winter time. That way after I'm demented
or dead and gone if the gov't changes the rules again it can be changed
manually.
I programmed the receiver for our local time offset from UTC. I then add or
don't add an hour as the case may be.
Morris
More information about the Time-nuts_lists.febo.com
mailing list