new: #asUtcTimestamp
authorStefan Vogel <sv@exept.de>
Thu, 29 Jun 2006 10:22:22 +0200
changeset 9402 39ea6523196d
parent 9401 65f884297c68
child 9403 ba6ca2bcfe10
new: #asUtcTimestamp
Timestamp.st
--- a/Timestamp.st	Thu Jun 29 10:19:42 2006 +0200
+++ b/Timestamp.st	Thu Jun 29 10:22:22 2006 +0200
@@ -979,6 +979,16 @@
     ^ self 
 !
 
+asUtcTimestamp
+    "convert a local time timestamp to UTC"
+
+    ^ self + self utcOffset
+
+    "
+       Timestamp now asUtcTimestamp
+    "
+!
+
 literalArrayEncoding
     "encode myself as an array, from which a copy of the receiver
      can be reconstructed with #decodeAsLiteralArray.
@@ -1324,7 +1334,7 @@
 !Timestamp class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Timestamp.st,v 1.104 2006-06-20 06:25:10 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Timestamp.st,v 1.105 2006-06-29 08:22:22 stefan Exp $'
 ! !
 
 Timestamp initialize!