E-MailRelay

- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Types | Static Public Member Functions | List of all members
G::DateTime Class Reference

A low-level static class used by Date and Time. More...

`#include <gdatetime.h>`

## Public Types
typedef struct std::tm | BrokenDownTime
typedef std::pair< bool, unsigned int > | Offset

## Static Public Member Functions
static EpochTime | now ()
| Returns the current epoch time.
static EpochTime | epochTime (const BrokenDownTime &broken_down_time)
| Converts from UTC broken-down-time to epoch time.
static BrokenDownTime | utc (EpochTime epoch_time)
| Converts from epoch time to UTC broken-down-time.
static BrokenDownTime | local (EpochTime epoch_time)
| Converts from epoch time to local broken-down-time.
static Offset | offset (EpochTime epoch_time)
| Returns the offset between UTC and localtime as at 'epoch_time'. More...
static std::string | offsetString (Offset offset)
| Converts the given utc/localtime offset into a five-character "+/-hhmm" string. More...
static std::string | offsetString (int hh)
| Overload for a signed integer timezone.

## Detailed Description

A low-level static class used by Date and Time.

Definition at line 73 of file gdatetime.h.

## Member Function Documentation

G::DateTime::Offset G::DateTime::offset | ( | EpochTime | epoch_time | ) |
| static

Returns the offset between UTC and localtime as at 'epoch_time'.

The returned pair has 'first' set to true if localtime is ahead of (ie. east of) UTC.

(Note that this may be a relatively expensive operation.)

Definition at line 139 of file gdatetime.cpp.

std::string G::DateTime::offsetString | ( | Offset | offset | ) |
| static

Converts the given utc/localtime offset into a five-character "+/-hhmm" string.

See also RFC-2822.

Definition at line 158 of file gdatetime.cpp.

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

- /tmp/slackrepo/SBo/slackrepo.S3SYfd/build_emailrelay/emailrelay-2.0.1/src/glib/gdatetime.h
- /tmp/slackrepo/SBo/slackrepo.S3SYfd/build_emailrelay/emailrelay-2.0.1/src/glib/gdatetime.cpp
- /tmp/slackrepo/SBo/slackrepo.S3SYfd/build_emailrelay/emailrelay-2.0.1/src/glib/gdatetime_unix.cpp