Matthew wrote:
>But! Then the time changed and now the calculations are off by 1 hour.

Not at all!  The calculations will continue to give you precise one-week
intervals.  It's just that with the change in timezone offset these
intervals are no longer *described* using the same time of day.

OK, so you want the other behaviour.  I suggest that instead of storing
an actual timestamp you should store a broken-down time: week number,
day of week, local time of day, and (most important) timezone rule.
You can put those together in DateTime to find out what point in time
they refer to.  Increment the week number as required.

Watch out for times of day that get repeated or skipped at offset changes.
These are different times of day in different timezones.

-zefram

Reply via email to