|
Smalltalk/X WebserverDocumentation of class 'TZTimestamp': |
||
|
|
Class: TZTimestampInheritance:Object | +--Magnitude | +--AbstractTime | +--Timestamp | +--TZTimestamp
Description:
This class represents time values in milliSeconds starting some time in the past,
which were created in another (explicit) timezone.
Internally, they keep the milliseconds based on UTC time (just like the other timestamps),
so the time values can be compared easily.
However, when printed, the original timezone information is taken into account.
Also Note:
On UNIX, osTime can only hold dates between 1970-01-01T00:00:00Z and 2038-01-19T00:00:00Z
However, timestamp instances can hold negative osTime values (which are timestamps
before 1.1.1970 and greater than 4294967295 (2^32-1) for timestamps after 2038-01-19.
[example:]
the current time as local time:
Transcript showCR:Timestamp now
the current time as utc time:
Transcript showCR:UtcTimestamp now.
same:
Transcript showCR:Timestamp now asUtcTimestamp.
the current time in NewYork:
Transcript showCR:( Timestamp now asTZTimestamp:(Timestamp utcOffsetFrom:'EST') )
same
Transcript showCR:( Timestamp now asTZTimestampInZone:'EST' )
same
Transcript showCR:( Timestamp now asTZTimestamp:(5*3600) )
what is the current time in Berlin:
Transcript showCR:( Timestamp now asTZTimestampInZone:'MEZ' )
and the date:
Transcript showCR:( Timestamp now asTZTimestampInZone:'MEZ' ) asDate
and the date in Tokio:
Transcript showCR:( Timestamp now asTZTimestampInZone:'JST' ) asDate
and the date in Hawai:
Transcript showCR:( Timestamp now asTZTimestampInZone:'HAST' ) asDate
and the date in NewYork:
Transcript showCR:( Timestamp now asTZTimestampInZone:'EST' ) asDate
Related information:
Timestamp
UtcTimestamp
Time
Date
Class protocol:instance creation
Instance protocol:accessing
|
||
|
|
ST/X 7.1.0.0; WebServer 1.663 at exept.de:8081; Wed, 17 Dec 2025 10:10:41 GMT
|