#BUGFIX by cg
authorClaus Gittinger <cg@exept.de>
Sat, 26 May 2018 14:06:12 +0200
changeset 23028 d93aefb6e389
parent 23027 f00deb84bd56
child 23029 05833aa782e3
#BUGFIX by cg class: Timestamp::TimestampISO8601Builder class changed: #print:compact:asLocal:asUTC:subSecondDigits:suppressZeroSubSecondDigits:timeSeparator:timeOnly:on: #print:compact:asLocal:asUTC:withMilliseconds:on: fix: time only printing (no delimiter)
Timestamp.st
--- a/Timestamp.st	Fri May 25 14:29:43 2018 +0200
+++ b/Timestamp.st	Sat May 26 14:06:12 2018 +0200
@@ -4315,8 +4315,8 @@
         timeInfo month printOn:aStream leftPaddedTo:2 with:$0.
         compact ifFalse:[ aStream nextPut: $- ].
         timeInfo day printOn:aStream leftPaddedTo:2 with:$0.
+        aStream nextPut:tSep.
     ].
-    aStream nextPut:tSep.
     timeInfo hours printOn:aStream leftPaddedTo:2 with:$0.
     compact ifFalse:[ aStream nextPut: $:].
     timeInfo minutes printOn:aStream leftPaddedTo:2 with:$0.
@@ -4405,33 +4405,36 @@
     "
 
     "Created: / 15-06-2005 / 17:56:51 / masca"
+    "Modified: / 26-05-2018 / 13:43:00 / Claus Gittinger"
 !
 
 print: aTimestamp compact:compact asLocal:asLocal asUTC:asUTC withMilliseconds:withMillis on: aStream
     "Print the given timestamp in general ISO8601 format,
      such as '2014-11-06T11:48:09Z'.
-	compact: if true, the compact format (without separating dashes and colons is generated)
-	asLocal: if true, generates a localtime string (with the machine's current timezone setting)
-	asUTC: if true, generates a utc string
-	    if both are false:
-		generate a string depending on the type of timestamp:
-		    if local: generate a local timezone string
-		    if utc: generate a utc string
-		    otherwise it is a timestamp from another timezone (TZTimestamp), then print in its timezone
-	withMilliseconds: if false, no milliseconds are generated"
+        compact: if true, the compact format (without separating dashes and colons is generated)
+        asLocal: if true, generates a localtime string (with the machine's current timezone setting)
+        asUTC: if true, generates a utc string
+            if both are false:
+                generate a string depending on the type of timestamp:
+                    if local: generate a local timezone string
+                    if utc: generate a utc string
+                    otherwise it is a timestamp from another timezone (TZTimestamp), then print in its timezone
+        withMilliseconds: if false, no milliseconds are generated"
 
     self
-	print:aTimestamp
-	compact:compact asLocal:asLocal asUTC:asUTC
-	withMilliseconds:withMillis
-	timeSeparator:$T
-	on:aStream
+        print:aTimestamp
+        compact:compact asLocal:asLocal asUTC:asUTC
+        withMilliseconds:withMillis
+        timeSeparator:$T timeOnly:false
+        on:aStream
 
     "
      self print:(Timestamp now) on:Transcript
      self printAsLocalTime:(Timestamp now) on:Transcript
      self printAsLocalTime:(Timestamp now asTZTimestamp:-7200) on:Transcript
     "
+
+    "Modified: / 26-05-2018 / 13:43:39 / Claus Gittinger"
 !
 
 print:aTimestamp compact:compact asLocal:asLocal asUTC:asUTC withMilliseconds:withMillis timeSeparator:tSep on:aStream