Safir SDK Core
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Safir::Time::TimeProvider Class Reference

The Time class contains functions to operate on time. More...

#include <Safir/Time/TimeProvider.h>

Static Public Member Functions

static
Safir::Dob::Typesystem::Si64::Second 
GetUtcTime ()
 Get current UTC time. More...
 
static boost::posix_time::ptime ToLocalTime (const Safir::Dob::Typesystem::Si64::Second utcTime)
 Convert from UTC to local time. More...
 
static
Safir::Dob::Typesystem::Si64::Second 
ToUtcTime (const boost::posix_time::ptime &localTime)
 Convert local time to UTC time. More...
 
static boost::posix_time::ptime ToPtime (const Safir::Dob::Typesystem::Si64::Second utcTime)
 Get specified UTC time in boost::posix_time::ptime representation. More...
 
static
Safir::Dob::Typesystem::Si64::Second 
ToDouble (const boost::posix_time::ptime &utcTime)
 Convert specified UTC time to a Double. More...
 

Detailed Description

The Time class contains functions to operate on time.

Member Function Documentation

static Safir::Dob::Typesystem::Si64::Second Safir::Time::TimeProvider::GetUtcTime ( )
static

Get current UTC time.

Returns
Seconds and fraction since jan 1 1970 00:00
static Safir::Dob::Typesystem::Si64::Second Safir::Time::TimeProvider::ToDouble ( const boost::posix_time::ptime &  utcTime)
static

Convert specified UTC time to a Double.

Parameters
[in]utcTime- The UTC time
Returns
Seconds and fraction since jan 1 1970 00:00

Referenced by Safir::Databases::Odbc::TimeColumn::GetValue(), and Safir::Time::AceTimeConverter::ToAceTime().

Here is the caller graph for this function:

static boost::posix_time::ptime Safir::Time::TimeProvider::ToLocalTime ( const Safir::Dob::Typesystem::Si64::Second  utcTime)
static

Convert from UTC to local time.

Parameters
[in]utcTime- The time in UTC
Returns
The local time
static boost::posix_time::ptime Safir::Time::TimeProvider::ToPtime ( const Safir::Dob::Typesystem::Si64::Second  utcTime)
static

Get specified UTC time in boost::posix_time::ptime representation.

Parameters
[in]utcTime- The UTC time
Returns
The UTC time stored in a boost::posix_time::ptime object

Referenced by Safir::Databases::Odbc::TimeColumn::SetValue(), and Safir::Time::AceTimeConverter::ToPtime().

Here is the caller graph for this function:

static Safir::Dob::Typesystem::Si64::Second Safir::Time::TimeProvider::ToUtcTime ( const boost::posix_time::ptime &  localTime)
static

Convert local time to UTC time.

Parameters
[in]localTime- The local time
Returns
Seconds and fraction since jan 1 1970 00:00