
Some questions about this library (please, keep in mind I'm new using it): 1) I was testing localtime() using US/Pacific as time zone and trying to see if transitions to DST were done correctly. So I set my local time to April 4 2004, 1:59 a.m.. Some minutes later the local time was correctly reported as April 4, 3:02. Then, I set my local time to October 31, 1:59 and I double checked that localtime() was in fact giving me 1:59. Two minutes later I was expecting the wall clock to go back one hour. It didn't. What am I doing wrong? 2) Is it possible to disable DST changes when using this library? Say the user wants to move the clock forward/backward manually when DST is in effect instead of the library doing it for him. Thanks a lot for you help. RBallen

<<On Wed, 26 May 2004 08:11:51 -0700, Ruby Ballen <RBallen@hypercom.com> said:
2) Is it possible to disable DST changes when using this library? Say the user wants to move the clock forward/backward manually when DST is in effect instead of the library doing it for him.
This does not make sense. The clock per se is not changed during the DST transition, only the way local time is computed from UTC. -GAWollman

Ruby Ballen <RBallen@hypercom.com> writes:
I set my local time to October 31, 1:59 and I double checked that localtime() was in fact giving me 1:59. Two minutes later I was expecting the wall clock to go back one hour. It didn't. What am I doing wrong?
Sorry I don't know. It works for me. I suspect you'll have to debug it further.
2) Is it possible to disable DST changes when using this library?
Sure; use (for example) TZ='MST7', which means to always use Mountain Standard Time without daylight-saving. Such a setting would be appropriate for Phoenix, Arizona after 1968, for example.
Say the user wants to move the clock forward/backward manually when DST is in effect instead of the library doing it for him.
That doesn't sound right. The internal clock always uses UTC (also known as GMT), so the user shouldn't have to adjust it manually (except perhaps for leap seconds, which is a different issue).
participants (3)
-
Garrett Wollman
-
Paul Eggert
-
Ruby Ballen