Changeset 286

Show
Ignore:
Timestamp:
04/27/08 12:27:52 (7 months ago)
Author:
JarrettBillingsley
Message:

Added extra param to os.dateTime.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/minid/oslib.d

    r284 r286  
    184184    int dateTime(MDState s, uint numParams) 
    185185    { 
     186        bool useGMT = false; 
    186187        MDTable t = null; 
    187          
     188 
    188189        if(numParams > 0) 
    189             t = s.getParam!(MDTable)(0); 
    190  
    191         s.push(DateTimeToTable(s, WallClock.toDate, t)); 
     190        { 
     191            if(s.isParam!("bool")(0)) 
     192            { 
     193                useGMT = s.getParam!(bool)(0); 
     194                 
     195                if(numParams > 1) 
     196                    t = s.getParam!(MDTable)(1); 
     197            } 
     198            else 
     199                t = s.getParam!(MDTable)(0); 
     200        } 
     201 
     202        s.push(DateTimeToTable(s, useGMT ? Clock.toDate : WallClock.toDate, t)); 
    192203        return 1; 
    193204    }