Class: TTimeZone

Declaration: DateTime.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

MCollectible

Inherited By:

None.

Purpose:

Performs conversions between system time, or Universal Time Clock (UTC) time, and the local time for a particular locale. Local time is expressed as an offset to UTC time. TTimeZone does not provide protocol for daylight savings time. You need two different instances of TTimeZone to cover standard time and daylight savings time for a geographic time zone.

Instantiation:

Allocate on the heap or the stack.

Deriving Classes:

This class is not designed to be derived.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Other Considerations:

None.

Member Function: TTimeZone::TTimeZone

  1. TTimeZone ()
  2. TTimeZone (const TTime offSetFromUTC, const TLocalizableName & timezoneName)
  3. TTimeZone (const TTimeZone & timezone)

Interface Category:

API.

Purpose:

  1. Default constructor.
  2. Constructs a time zone with a particular offset from UTC and a localizable name.
  3. Copy constructor.

Calling Context:

  1. Called by the stream-in operators.
  2. Called to construct a specific time zone.
  3. Called to copy an object.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TTimeZone::~TTimeZone

virtual ~ TTimeZone ()

Interface Category:

API.

Purpose:

Destructor.

Calling Context:

Called to destroy an object.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TTimeZone::UTCToLocalTime

virtual void UTCToLocalTime (const TTime & UTC, TTime & localTime) const

Interface Category:

API.

Purpose:

Converts UTC time to local time for this time zone.

Calling Context:

Called during date/time formatting.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TTimeZone::LocalTimeToUTC

virtual void LocalTimeToUTC (const TTime & localTime, TTime & UTC) const

Interface Category:

API.

Purpose:

Converts local time to UTC time.

Calling Context:

Called during date/time scanning.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TTimeZone::operator=

TTimeZone & operator =(const TTimeZone & theTimeZone)

Interface Category:

API.

Purpose:

Assignment operator.

Calling Context:

Called when an object is assigned to another compatible object.

Parameters:

Return Value:

A non-const reference to the left-hand side object.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TTimeZone::operator<<=

virtual TStream & operator <<= (TStream & fromWhere)

Interface Category:

API.

Purpose:

Stream-in operator.

Calling Context:

Called to stream in data.

Parameters:

Return Value:

Returns a reference to the stream the object streams itself in from.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TTimeZone::operator>>=

virtual TStream & operator >>=(TStream & toWhere) const

Interface Category:

API.

Purpose:

Stream-out operator.

Calling Context:

Called to stream out data.

Parameters:

Return Value:

Returns a reference to the stream the object streams itself out to.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TTimeZone::Hash

virtual long Hash () const

Interface Category:

API.

Purpose:

Generates a hash value.

Calling Context:

Called to generate a hash value.

Parameters:

Return Value:

The numeric value of the hash.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TTimeZone::SetName

virtual void SetName (const TLocalizableName & timeZoneName)

Interface Category:

API.

Purpose:

Set the name of the time zone.

Calling Context:

Called to set the localizable name of the time zone.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:


Member Function: TTimeZone::GetName

virtual void GetName (TLocalizableName & timeZoneName) const

Interface Category:

API.

Purpose:

Get the name of the time zone.

Calling Context:

Called to get the localizable name of the time zone.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:


Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.