eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'UtcTimestamp':

Home

Documentation
www.exept.de
Everywhere
for:
[back]

Class: UtcTimestamp


Inheritance:

   Object
   |
   +--Magnitude
      |
      +--AbstractTime
         |
         +--Timestamp
            |
            +--UtcTimestamp

Package:
stx:libbasic
Category:
Magnitude-Time
Version:
rev: 1.17 date: 2018/05/24 15:49:57
user: cg
file: UtcTimestamp.st directory: libbasic
module: stx stc-classLibrary: libbasic
Author:
Stefan Vogel (stefan@zwerg.nil.exept.de)

Description:


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:]


Related information:

    Time
    Date

Instance protocol:

accessing
o  timeInfo

o  timeZoneName

o  utcOffset
I am an UTC timestamp, so there is no offset

o  utcOffsetWithoutDst

converting
o  asLocalTimestamp
represent myself as a timestamp in the local timezone

o  asUtcTimestamp
I am an UtcTimestamp

initialization
o  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
o  storeStringClass

testing
o  isLocalTimestamp
return true, if I am a local timestamp (i.e. with no TZ info)

o  isUtcTimestamp
return true, if I am a utc timestamp

visiting
o  acceptVisitor: aVisitor with: aParameter
dispatch for visitor pattern; send #visitUtcTimestamp:with: to aVisitor.



ST/X 7.2.0.0; WebServer 1.670 at bd0aa1f87cdd.unknown:8081; Fri, 19 Apr 2024 18:52:41 GMT