G
Generic Usenet Account
Hi,
Is there any way to make time-of-day adjustments for daylight savings
using only standard time functions? We have a program that executes
daily at a fixed time of day. After daylight savings happens, the
time-of-day alignment is lost. For example, if the daily task gets
kicked in at 9 p.m. every evening, after daylight savings ends in
fall, the task is shown as kicking in at 8 p.m. Similarly, if the
daily task gets kicked in at 4 a.m. every morning, after daylight
savings starts in spring, the task is shown as kicking in at 5 a.m.
I tried a few things, including explicitly advancing the day field in
the struct tm structure (sample source code posted to comp.sources.d),
without messing with the seconds, minutes and hours fields. However,
even that is not working. It appears that mktime() is not smart
enough to detect that daylight savings has started/ended.
Any help will be appreciated.
Regards,
Anil
Is there any way to make time-of-day adjustments for daylight savings
using only standard time functions? We have a program that executes
daily at a fixed time of day. After daylight savings happens, the
time-of-day alignment is lost. For example, if the daily task gets
kicked in at 9 p.m. every evening, after daylight savings ends in
fall, the task is shown as kicking in at 8 p.m. Similarly, if the
daily task gets kicked in at 4 a.m. every morning, after daylight
savings starts in spring, the task is shown as kicking in at 5 a.m.
I tried a few things, including explicitly advancing the day field in
the struct tm structure (sample source code posted to comp.sources.d),
without messing with the seconds, minutes and hours fields. However,
even that is not working. It appears that mktime() is not smart
enough to detect that daylight savings has started/ended.
Any help will be appreciated.
Regards,
Anil