UtcTimestamp.st
changeset 16987 1c3e57adcf34
parent 16979 a793015c75f4
child 16997 f0867a7f248b
equal deleted inserted replaced
16986:fafb2758c9f6 16987:1c3e57adcf34
    64 timeInfo
    64 timeInfo
    65     ^ self utcTimeInfo
    65     ^ self utcTimeInfo
    66 !
    66 !
    67 
    67 
    68 timeZoneName
    68 timeZoneName
    69     ^ #utc
    69     ^ 'UTC'
    70 !
    70 !
    71 
    71 
    72 utcOffset
    72 utcOffset
    73     ^ 0
    73     ^ 0
    74 ! !
    74 ! !
    88 ! !
    88 ! !
    89 
    89 
    90 !UtcTimestamp methodsFor:'initialization'!
    90 !UtcTimestamp methodsFor:'initialization'!
    91 
    91 
    92 setOSTimeFromYear:y month:m day:d hour:h minute:min second:s millisecond:millis 
    92 setOSTimeFromYear:y month:m day:d hour:h minute:min second:s millisecond:millis 
       
    93     "private: ask the operating system to compute the internal osTime (based on the epoch),
       
    94      given y,m,d and h,m,s in utc time"
       
    95 
    93     osTime := OperatingSystem 
    96     osTime := OperatingSystem 
    94                 computeOSTimeFromUTCYear:y month:m day:d
    97                 computeOSTimeFromUTCYear:y month:m day:d
    95                 hour:h minute:min second:s
    98                 hour:h minute:min second:s
    96                 millisecond:millis
    99                 millisecond:millis
    97 
   100 
   104 ! !
   107 ! !
   105 
   108 
   106 !UtcTimestamp methodsFor:'testing'!
   109 !UtcTimestamp methodsFor:'testing'!
   107 
   110 
   108 isLocalTimestamp
   111 isLocalTimestamp
       
   112     "return true, if I am a local timestamp"
       
   113 
   109     ^ false
   114     ^ false
   110 !
   115 !
   111 
   116 
   112 isUtcTimestamp
   117 isUtcTimestamp
       
   118     "return true, if I am a utc timestamp"
       
   119 
   113     ^ true
   120     ^ true
   114 ! !
   121 ! !
   115 
   122 
   116 !UtcTimestamp methodsFor:'visiting'!
   123 !UtcTimestamp methodsFor:'visiting'!
   117 
   124 
   121     ^ aVisitor visitUtcTimestamp:self with:aParameter
   128     ^ aVisitor visitUtcTimestamp:self with:aParameter
   122 ! !
   129 ! !
   123 
   130 
   124 !UtcTimestamp class methodsFor:'documentation'!
   131 !UtcTimestamp class methodsFor:'documentation'!
   125 
   132 
       
   133 version
       
   134     ^ '$Header: /cvs/stx/stx/libbasic/UtcTimestamp.st,v 1.10 2014-11-07 21:24:01 cg Exp $'
       
   135 !
       
   136 
   126 version_CVS
   137 version_CVS
   127     ^ '$Header: /cvs/stx/stx/libbasic/UtcTimestamp.st,v 1.9 2014-11-07 19:45:40 cg Exp $'
   138     ^ '$Header: /cvs/stx/stx/libbasic/UtcTimestamp.st,v 1.10 2014-11-07 21:24:01 cg Exp $'
   128 ! !
   139 ! !
   129 
   140