Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#4 localtime() returns incorret is_dst

open
None
5
2001-10-16
2001-08-29
Chris Nandor
No

localtime() returns is_dst relative to current time,
independent of what the time passed to localtime is. So
after calling localtime(), is_dst will always be true no
matter that time I pass to localtime, if the current
time is in DST (and vice versa). This was a problem in
GUSI 1 too.

Discussion

  • Chris Nandor
    Chris Nandor
    2001-10-16

    • assigned_to: nobody --> neeri
     
  • Logged In: YES
    user_id=37219

    Sigh. This is bad, and pretty much uncorrectable. My only consolation is that I'm apparently in good company (I saw the same behavior on a Solaris system that I tested this on).

     
  • Chris Nandor
    Chris Nandor
    2002-01-07

    Logged In: YES
    user_id=3660

    Yeah, I figured this would be the answer, as I noticed it was
    in GUSI 1, and saw what the basic problem was after some
    research in GUSI 2. Such is life, we've lived with it this
    long. I will note it in perlport.