| Home | Libraries | People | FAQ | More

# boost::asio::time_traits< boost::posix_time::ptime > Struct Template Reference

List of all members.

## Detailed Description

### template<>
struct boost::asio::time_traits< boost::posix_time::ptime >

Time traits specialised for posix_time.

## Public Types

typedef boost::posix_time::ptime | time_type
| The time type.
typedef boost::posix_time::time_duration | duration_type
| The duration type.

## Static Public Member Functions

static time_type | now ()
| Get the current time.
static time_type | add (const time_type &t, const duration_type &d)
| Add a duration to a time.
static duration_type | subtract (const time_type &t1, const time_type &t2)
| Subtract one time from another.
static boost::posix_time::ptime | to_utc (const time_type &t)
| Convert to UTC in the posix time type.
static time_type | from_utc (const boost::posix_time::ptime &t)
| Convert from UTC in the posix time type.

## Member Typedef Documentation

typedef boost::posix_time::ptime boost::asio::time_traits< boost::posix_time::ptime >::time_type

The time type.

typedef boost::posix_time::time_duration boost::asio::time_traits< boost::posix_time::ptime >::duration_type

The duration type.

## Member Function Documentation

static time_type boost::asio::time_traits< boost::posix_time::ptime >::now | ( |  | ) | `[static]`

Get the current time.

static time_type boost::asio::time_traits< boost::posix_time::ptime >::add | ( | const time_type & | t,
|  | const duration_type & | d |
| ) |  |  | `[static]`

Add a duration to a time.

static duration_type boost::asio::time_traits< boost::posix_time::ptime >::subtract | ( | const time_type & | t1,
|  | const time_type & | t2 |
| ) |  |  | `[static]`

Subtract one time from another.

static boost::posix_time::ptime boost::asio::time_traits< boost::posix_time::ptime >::to_utc | ( | const time_type & | t | ) | `[static]`

Convert to UTC in the posix time type.

static time_type boost::asio::time_traits< boost::posix_time::ptime >::from_utc | ( | const boost::posix_time::ptime & | t | ) | `[static]`

Convert from UTC in the posix time type.

| Copyright © 2003 - 2006 Christopher M. Kohlhoff