Vault  4.1
Public Member Functions
IVRemoteTimeZoneConverter Class Reference

You can provide a callback interface for VInstant to allow for converting to and from "remote time zones" (RTZ). More...

#include <vinstant.h>

List of all members.

Public Member Functions

virtual void offsetToRTZStruct (Vs64 offset, const VString &timeZoneID, VInstantStruct &when)=0
 Converts an offset (ms from 1970 UTC, same as VInstant "value") to a broken-down calendar time in the specified time zone.
virtual Vs64 offsetFromRTZStruct (const VString &timeZoneID, const VInstantStruct &when)=0
 Converts a broken-down calendar time, interpreted in the specified time zone, to an offset (ms from 1970 UTC, same as VInstant "value").

Detailed Description

You can provide a callback interface for VInstant to allow for converting to and from "remote time zones" (RTZ).

Currently the built-in code of VInstant (using OS-provided functions) can only convert between UTC and the local time zone.

To implement remote time zone conversion, implement this interface, and call VInstant::setRemoteTimeZoneConverter(). Then you can pass RTZ specifiers to the VInstant APIs that allow them, and VInstant will call back to the installed RTZ converter interface.

Definition at line 379 of file vinstant.h.


Member Function Documentation

virtual void IVRemoteTimeZoneConverter::offsetToRTZStruct ( Vs64  offset,
const VString timeZoneID,
VInstantStruct when 
) [pure virtual]

Converts an offset (ms from 1970 UTC, same as VInstant "value") to a broken-down calendar time in the specified time zone.

This function should throw a VException if the time zone ID is invalid.

Parameters:
offseta number milliseconds since UTC 1970 00:00:00.000
timeZoneIDa time zone ID string (e.g., PST, EST, etc.) from the set of strings supported by the converter
whena structure that will be filled to contain the y/m/d/h/m/s for the specified UTC offset as seen in the specified time zone
virtual Vs64 IVRemoteTimeZoneConverter::offsetFromRTZStruct ( const VString timeZoneID,
const VInstantStruct when 
) [pure virtual]

Converts a broken-down calendar time, interpreted in the specified time zone, to an offset (ms from 1970 UTC, same as VInstant "value").

This function should throw a VException if the time zone ID is invalid.

Parameters:
timeZoneIDa time zone ID string (e.g., PST, EST, etc.) from the set of strings supported by the converter
whena structure containing y/m/d/h/m/s values in the specified time zone
Returns:
the number milliseconds since UTC 1970 00:00:00.000 that the time represents as interpreted in the specified time zone

The documentation for this class was generated from the following file:

Copyright ©1997-2014 Trygve Isaacson. All rights reserved. This documentation was generated with Doxygen.