in reply to The darned Feb problem :)
in thread where does the time go?

Let me understand this.

Shouldn't localtime return a value based on the OS date? So, how come it won't work?

I need to clear this out.

Er Galvão Abbott
a.k.a. Lobo, DaWolf
Webdeveloper

Replies are listed 'Best First'.
Re: Re: The darned Feb problem :)
by zakb (Pilgrim) on Apr 24, 2002 at 16:00 UTC

    DaWolf,

    Imagine it's the 31st March. You subtract 1 from the month and get 31st February - which isn't a valid date.

    A similar problem occurs when it's any day in January. You subtract one from the month and get -1...

    Hope this helps!

      Damn! You guys are right.

      I've never realized this. Sooo, time to rewrite some code... :)

      Er Galvão Abbott
      a.k.a. Lobo, DaWolf
      Webdeveloper
        Not until you refund me my last bank deposit which apparently went through on the 54th of June, 1704... >:)
        (as you might guess, it wasn't much... just my $two_cents)

        blyman
        setenv EXINIT 'set noai ts=2'