
Well, yes. What I was trying to say is if it is possible to do this: - When the user enables automatic DST calculations, use the regular rules. - When the user disables automatic DST calculations, compute local time using the offset that the time zone has when it is in standard time, regardless of DST being in effect or not. It's a desire to have this option, but if it's difficult to achieve it's OK. Thanks tz-request@lecserver. nci.nih.gov To: RBallen@hypercom.com cc: tz@lecserver.nci.nih.gov 05/26/04 11:21 AM Subject: Beginner questions <<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

On May 26, 2004, at 11:23 AM, Ruby Ballen wrote:
Well, yes. What I was trying to say is if it is possible to do this:
- When the user enables automatic DST calculations, use the regular rules.
- When the user disables automatic DST calculations, compute local time using the offset that the time zone has when it is in standard time, regardless of DST being in effect or not.
Yes. As Paul Eggert said in his reply:
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.
Setting the TZ environment variable will affect only processes with that setting; for example, if you set it in a UN*X shell, the shell and the processes it creates will use that setting. That won't affect other processes on the system, e.g. system daemons; you'd have to change some global time zone setting (however that's done on your particular system) to do that. Note, however, that this does *NOT* let the user "move the clock forward/backward manually when DST is in effect", if by "the clock" you mean the system clock - on UN*Xes, the clock doesn't get moved when DST starts or ends, as Garrett Wollman noted. What is the exact thing you're trying to do here?
participants (2)
-
Guy Harris
-
Ruby Ballen