|
Class: UtcTimestamp
Object
|
+--Magnitude
|
+--AbstractChronologyObject
|
+--AbstractTime
|
+--Timestamp
|
+--UtcTimestamp
- Package:
- stx:libbasic
- Category:
- Kernel-Chronology
- Version:
- rev:
1.21
date: 2023/06/06 16:05:40
- user: cg
- file: UtcTimestamp.st directory: libbasic
- module: stx stc-classLibrary: libbasic
This is a Timestamp, that represents itself as UTC.
Internally it stores exactly the same value as Timestamp,
so the following expression is always true:
someTimestamp asUtcTimestamp = someTimestamp asLocalTimestamp
But when printing, accessing hour, minute, ... and converting to Date and Time,
it returns the values represented in the UTC zone instead of the local timezone.
Be aware that this may lead to interesting results; for example when converting a timestamp
to a date, you may get a different date from an UTCTimestamp and a local timestamp.
[instance variables:]
[class variables:]
copyrightCOPYRIGHT (c) 2011 by eXept Software AG
All Rights Reserved
This software is furnished under a license and may be used
only in accordance with the terms of that license and with the
inclusion of the above copyright notice. This software may not
be provided or otherwise made available to, or used by, any
other person. No title to or ownership of the software is
hereby transferred.
accessing
-
timeInfo
-
(comment from inherited method)
fake an info which the OS cannot give me
-
timeZoneName
-
-
utcOffset
-
I am an UTC timestamp, so there is no offset
-
utcOffsetWithoutDst
-
I am an UTC timestamp, so there is no offset
converting
-
asLocalTimestamp
-
represent myself as a timestamp in the local timezone
-
asUtcTimestamp
-
I am an UtcTimestamp
initialization
-
setOSTimeFromYear: y month: m day: d hour: h minute: min second: s millisecond: millis
-
private: ask the operating system to compute the internal osTime (based on the epoch),
given y,m,d and h,m,s in utc time
private
-
storeStringClass
-
my storeString will ask Timestamp to read the instance
testing
-
isLocalTimestamp
-
return true, if I am a local timestamp (i.e. with no TZ info)
-
isUtcTimestamp
-
return true, if I am a utc timestamp
visiting
-
acceptVisitor: aVisitor with: aParameter
-
dispatch for visitor pattern; send #visitUtcTimestamp:with: to aVisitor.
|