AbstractTime.st
changeset 16982 c37260d6ff78
parent 16941 78358165ed6b
child 17015 f7c4867a3633
--- a/AbstractTime.st	Fri Nov 07 21:01:09 2014 +0100
+++ b/AbstractTime.st	Fri Nov 07 22:23:06 2014 +0100
@@ -144,13 +144,14 @@
 
 dateAndTimeNow
     "return an array filled with the current date and time.
+     As these provide no timezone info, this should be only used for user interface purposes.
      See also: Date today / Time now / Timestamp now."
 
     ^ Array with:(Date today) with:(Time now)
 
     "
-     Time dateAndTimeNow
-     Date dateAndTimeNow
+     Time dateAndTimeNow       
+     Date dateAndTimeNow       
     "
 
     "Modified: 19.4.1996 / 15:23:37 / cg"
@@ -162,13 +163,14 @@
     ^ self new setSeconds:0
 
     "
-        Timestamp epoch
-        Time epoch
+     Timestamp epoch
+     Time epoch     
     "
 !
 
 now
-    "return an instance of myself representing this moment."
+    "return an instance of myself representing this moment with second precision.
+     Timestamps will redefine this to always return millisecond precision."
 
     ^ self basicNew fromOSTime:(OperatingSystem getOSTime)
 
@@ -181,7 +183,7 @@
 !
 
 nowWithMilliseconds
-    "return an instance of myself representing this moment."
+    "return an instance of myself representing this moment with millisecond precision."
 
     ^ self basicNew fromOSTimeWithMilliseconds:(OperatingSystem getOSTime)
 
@@ -576,7 +578,11 @@
 !
 
 timeZoneName
-    ^ #utc
+    ^ 'UTC'
+!
+
+utcOffset
+    ^ 0
 ! !
 
 !AbstractTime methodsFor:'arithmetic'!
@@ -1135,7 +1141,7 @@
         %t      seconds within hour  (unpadded)
         %T      seconds from midNight  (unpadded)
 
-        %(TZD)  timeZone delta from UTC in the format +/-hh:mm  
+        %(TZD)  timeZone delta of the receiver from UTC in the format +/-hh:mm  
 
         %(milli1) milliseconds, truncated to 1/10th of a second 0..9         
         %(milli2) milliseconds, truncated to 1/100th of a second 00..99 0-padded to length 2        
@@ -1395,10 +1401,10 @@
 !AbstractTime class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/AbstractTime.st,v 1.86 2014-11-06 16:54:42 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/AbstractTime.st,v 1.87 2014-11-07 21:23:06 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic/AbstractTime.st,v 1.86 2014-11-06 16:54:42 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/AbstractTime.st,v 1.87 2014-11-07 21:23:06 cg Exp $'
 ! !