Changeset 2958


Ignore:
Timestamp:
Apr 30, 2012, 7:38:14 PM (3 years ago)
Author:
wmb
Message:

OLPC trac 11823 - sys-time&date was returning the wrong month. OFW represents month numbers as 1..12, consistent with human usage, while POSIX localtime() represents them as 0..11, more convenient for indexing into C arrays.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • forth/kernel/sysio.fth

    r2612 r2958  
    172172: l@+  ( adr -- l adr' )  dup l@  swap la1+  ; 
    173173: sys-time&date  ( -- s m h d m y ) 
    174    d# 64 syscall retval                     ( adr ) 
    175    l@+ l@+ l@+ l@+ l@+ l@+ drop  d# 1900 +  ( s m h d m y ) 
     174   d# 64 syscall retval                        ( adr ) 
     175   l@+ l@+ l@+ l@+ l@+ 1+ l@+ drop  d# 1900 +  ( s m h d m y ) 
    176176; 
    177177 
Note: See TracChangeset for help on using the changeset viewer.