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.
- TTimeZone ()
- TTimeZone (const TTime offSetFromUTC, const TLocalizableName & timezoneName)
- TTimeZone (const TTimeZone & timezone)
Interface Category:
API.
Purpose:
- Default constructor.
- Constructs a time zone with a particular offset from UTC and a localizable name.
- Copy constructor.
Calling Context:
- Called by the stream-in operators.
- Called to construct a specific time zone.
- Called to copy an object.
Parameters:
- Takes no parameters.
- const TTime offSetFromUTC -The offset of the local time from UTC time.
- const TLocalizableName & timezoneName -The localizable name for this time zone.
- const TTimeZone & timezone -The object to copy.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
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:
- const TTime & UTC -The UTC time.
- TTime & localTime -The local time.
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:
- const TTime & localTime -The local time.
- TTime & UTC -The UTC time.
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:
- const TTimeZone & theTimeZone -The source object for the assignment.
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:
- TStream & fromWhere -The stream the object is streamed in from.
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:
- TStream & toWhere -The stream the object is streamed out to.
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:
- TLocalizableName & timeZoneName -the return value which is the name of the time zone.
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.