Snip
> That part's easy - the tricky part is dealing with DST (Summer Time in
> some parts of the world.) There are a zillion different sets of rules,
> and they change from time to time. My solution was to store the offset
> in minutes and a schedule of the start and end date/times for the next 8
> years. The configuration program will automatically set US DST, British
> Summer Time, and European Summer Time. Beyond that, you've got to look
> up the times yourself. And you've got to remember to run the config
> program at least once every 8 years to update it.
> Scott
For what it is worth, here's NZ's DST adjustments.
(Do I need to go past 2012? The world's meant to end then and get rather
wet, according to a recent movie... <g> )
I'm not sure how you store the trip points as either Local Time or if you
use UTC month, day, hour, & minutes, or if it's minutes since 12:00am Jan 01
that year, but whichever, it was starting to get ugly just trying to
work it out, let alone trying to code for it (including allowing for
leap years, and which years are leap years...)
If possible, it might pay to allow the config program to load in the
DST offset info from a file on the PC somewhere - that way we only
need to work it out once per unlisted country & post it to the files
section of the group, instead of each individual having to work it out
to update it (and potentially get it wrong somewhere).
2010 Ends 3rd April, 14:00 UTC (becomes UTC +720 minutes)
Starts 26th September, 15:00 UTC (becomes UTC +780 minutes)
2011 Ends 2rd April, 14:00 UTC (becomes UTC +720 minutes)
Starts 25th September, 15:00 UTC (becomes UTC +780 minutes)
2012 Ends 31st March, 14:00 UTC (becomes UTC +720 minutes)
Starts 30th September, 15:00 UTC (becomes UTC +780 minutes)
2013 Ends 6th April, 14:00 UTC (becomes UTC +720 minutes)
Starts 29th September, 15:00 UTC (becomes UTC +780 minutes)
2014 Ends 5th April, 14:00 UTC (becomes UTC +720 minutes)
Starts 28th September, 15:00 UTC (becomes UTC +780 minutes)
2015 Ends 4th April, 14:00 UTC (becomes UTC +720 minutes)
Starts 27th September, 15:00 UTC (becomes UTC +780 minutes)
2016 Ends 2th April, 14:00 UTC (becomes UTC +720 minutes)
Starts 25th September, 15:00 UTC (becomes UTC +780 minutes)
2017 Ends 1th April, 14:00 UTC (becomes UTC +720 minutes)
Starts 24th September, 15:00 UTC (becomes UTC +780 minutes)
2017 Ends 31st March, 14:00 UTC (becomes UTC +720 minutes)
Starts 30th September, 15:00 UTC (becomes UTC +780 minutes)
Daylight Saving commences on the last Sunday in September, local time,
when 2.00am becomes 3.00am, and ends on the first Sunday in April
local time the following year, when 3.00am becomes 2.00am.
ref:
<http://www.dia.govt.nz/diawebsite.nsf/wpg_url/services-daylight-saving-index>
73
Ian ZL1VFO