ctime() problem with daylight saving time?

ctime() problem with daylight saving time?

Post by Ian Eva » Tue, 14 Jan 1997 04:00:00



I have just been testing some software to ensure it works properly with
daylight saving, and have found what seems like a bug in Solaris.  The time
zone I'm using is Australia/NSW, which reverts from daylight saving time to
normal time on the last Sunday in March (well, this year, anyway) when 3:00am
becomes 2:00am.  The standard time is 10 hours ahead of UTC.

The last Sunday in March this year is the 30th, but when I step the Unix
time through I find that the time seems to go backwards at 17:00 on the 29th
of March when I display it using ctime() or strftime().  This means that the
Unix time values of 859611600 and 859615200 both display Sat Mar 29 16:00.

I would think it might be a configuration problem except that mktime() seems
to successfully convert times to UTC so that the change occurs at 3:00am on
the 30th.  Both functions seem to work fine in October when going to
daylight saving time.  Considering it's happening 10 hours early, it sounds
like the timezone offset has been applied twice at some point.

I'm using Solaris 2.5.1 with (as far as I know) no patches applied (but I
really don't know).  I'm having trouble convincing myself that nobody else
would have noticed a bug like that, but I couldn't find a mention of it in
the FAQ or on dejanews.  Maybe I didn't look hard enough.

Any clues would be appreciated, as I really don't want to have to write my
own time and date stuff to get around that.  I've done that once in my life
and that was plenty.

Thanks

Ian Evans, Melbourne Australia (yes, I know Melbourne isn't in NSW).


 
 
 

1. Problems with daylight saving time

Hi there,

we syschronise the linux system to a radio controled clock via the
command "nwfstime". This command asks a novell server for the time (the
server time is radio controled). Since the time changed to daylight
saving time the command "nwfstime" does not return the daylight saving
time, it returns the "normal time".
Does anybody know whether the is a problem of "nwfstime" or of our
TIMEZONE setting and what's the right way to solve the problem?

P.S.: The time on the novell server is daylight saving time, we checked
this on another way.

Bye,
Erik

Erik Vellmete
MLP Dignos Software GmbH
Im Breitspiel 11
D-69126 Heidelberg
Tel.: 06221/348-765
Fax.: 06221/348-711

2. Changing fonts in rxvt, xterm, nxterm

3. Daylight Saving Time

4. Server misconfig when using POST-method in CGI-scripts

5. Help with Daylight saving time...

6. Senior system manager in new bioinformatics center

7. Changing to Daylight Saving TIme

8. Problems with Dell and SUSE Linux

9. Daylight saving time methods?

10. New daylight saving time code for SunOS 4.x?

11. How to set correct time: GMT vs. Daylight Saving?

12. daylight saving time

13. Daylight Saving Time