Maker Pro
Maker Pro

Daylight saving algorithms (slightly OT?)

B

Bruce Varley

Jan 1, 1970
0
Hi, I'm producing embedded equipment that needs to know about daylight
saving, which was introduced in WA late last year. The WA arrangement is
that clocks shift early in the last Sunday of a specified month. That's
reasonably OK to program into an embedded device, the only nonvolatile
config you need to put in is the changeover months, and then let the code
work out the changeover day. My concern is that the rules may change to
something else that would require me to reburn the code (much harder to do
in this case). Is anyone aware of any sort of de-facto standard that exists
for daylight saving changeovers, which specifies the rules, or limits to the
rules? TIA
 
C

Clifford Heath

Jan 1, 1970
0
Bruce said:
Hi, I'm producing embedded equipment that needs to know about daylight
saving, which was introduced in WA late last year. The WA arrangement is
that clocks shift early in the last Sunday of a specified month. That's
reasonably OK to program into an embedded device, the only nonvolatile
config you need to put in is the changeover months, and then let the code
work out the changeover day. My concern is that the rules may change to
something else that would require me to reburn the code (much harder to do
in this case). Is anyone aware of any sort of de-facto standard that exists
for daylight saving changeovers, which specifies the rules, or limits to the
rules? TIA

The only rule is that there are no rules. Linux systems implement a
package called, in Debian, tzdata, which contains a zoneinfo directory
full of files containing the rules, year by year, for each country and
zone. You could do worse than download the source packages that are
associated (packges.debian.org) and have a read. Handling of changes
relies on the package being updateable.

Clifford Heath.
 
J

Joseph Moschini

Jan 1, 1970
0
Bruce said:
Hi, I'm producing embedded equipment that needs to know about daylight
saving, which was introduced in WA late last year. The WA arrangement is
that clocks shift early in the last Sunday of a specified month. That's
reasonably OK to program into an embedded device, the only nonvolatile
config you need to put in is the changeover months, and then let the code
work out the changeover day. My concern is that the rules may change to
something else that would require me to reburn the code (much harder to do
in this case). Is anyone aware of any sort of de-facto standard that exists
for daylight saving changeovers, which specifies the rules, or limits to the
rules? TIA
At work we same problem with LED Time - Temperature Signs we make the
best solution was to have two external buttons to set the Time Zone. If
the sign is far away we use a simple door remote with up and down
buttons. Hope that helps
 
Top