#13 Time() - Rolling Over seconds 'L' / 'S'

open
Mark Hessling
None
5
2002-04-26
2002-01-26
dbareis
No

Hi,

I was (in one clause) appending the decimal part of
time('L') to the seconds or time('S') and got an
unwanted side effect (the old groundhog day bug - time
reversing).

How I did some more testing and at least as far as I
can see the original Groundhog day bug has gone, what
I did notice was the seconds on the 'S' rolls over AT
A DIFFERENT time than that for 'L'!!!

Bye
Dennis

Discussion

  • Mark Hessling
    Mark Hessling
    2002-04-26

    • assigned_to: nobody --> rexx
     
  • Logged In: YES
    user_id=333840

    time(), time(n), time(s), in fact all except time(l) round
    up the seconds value - TRL2 implies rounding up should not
    happen.

    removing this from builtin.c (in std_time()) fixes:

    if (unow>=(500*1000)
    && format != 'L')
    now ++;

    (now is current seconds, unow is current microseconds)