TimestampTzConverter Class Reference

Class which converts timestamps with timezones from varying string formats to a TDWTimestamp with UTC timezone. More...

List of all members.

Public Member Functions

TDWTimestamp ConvertStringToUTCTimestamp (const simba_wstring &in_timestampTzStr) const
 Convert a timestamp with timezone to the UTC timezone and return as a TDWTimestamp. If the timestamp has no timezone, it will be assumed to be in the UTC timezone already.
simba_wstring ConvertTimestampToString (const TDWTimestamp &in_timestamp, Timezone in_timezone=TZ_ZERO) const
 Convert a TDWTimestamp to a timestamp string having the format specified in the constructor of this object. Timezone of the TDWTimestamp is assumed to be UTC.
 TimestampTzConverter (const simba_wstring &in_format, ILogger *in_logger)
 Constructor.
 ~TimestampTzConverter ()
 Destructor.

Detailed Description

Class which converts timestamps with timezones from varying string formats to a TDWTimestamp with UTC timezone.


Constructor & Destructor Documentation

TimestampTzConverter ( const simba_wstring in_format,
ILogger in_logger 
)

Constructor.

Parameters:
in_format A format string specifying what format the timestamp strings will be in. For information about valid formats see: http://userguide.icu-project.org/formatparse/datetime#TOC-Date-Field-Symbol-Table
in_logger The logger to use for logging warnings and errors.

Destructor.


Member Function Documentation

TDWTimestamp ConvertStringToUTCTimestamp ( const simba_wstring in_timestampTzStr  )  const

Convert a timestamp with timezone to the UTC timezone and return as a TDWTimestamp. If the timestamp has no timezone, it will be assumed to be in the UTC timezone already.

Parameters:
in_timestampTzStr The timestamp with timezone as a string.
Returns:
The timestamp in UTC timezone (without timezone information).
simba_wstring ConvertTimestampToString ( const TDWTimestamp in_timestamp,
Timezone  in_timezone = TZ_ZERO 
) const

Convert a TDWTimestamp to a timestamp string having the format specified in the constructor of this object. Timezone of the TDWTimestamp is assumed to be UTC.

Parameters:
in_timestamp The timestamp in UTC time to convert to a formatted timestamp string.
in_timezone The timezone offset to convert the timestamp to before formatting. Default: TZ_ZERO.
Returns:
A formatted timestamp string having the specified timezone.

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

Generated on Wed May 17 14:21:19 2017 for SimbaEngine 10.1.3.1011 by simba