tbx
0.7.6
|
Class to handle the 5 byte times. More...
#include <path.h>
Public Member Functions | |
UTCTime () | |
Construct UTC time for Midnight, 1st Jan 1990. | |
UTCTime (long long csecs) | |
Construct a UTC time for the given number of centiseconds. More... | |
UTCTime (unsigned int loadAddress, unsigned int execAddress) | |
Construct a UTC time give file system catalog information. More... | |
UTCTime (const UTCTime &other) | |
Copy constructor. More... | |
UTCTime & | operator= (const UTCTime &other) |
Assign to value fo another UTCTime. More... | |
std::string | text () const |
Get time/date as text in standard format. More... | |
std::string | text (const std::string &format) const |
Get time/date as text in specified format. More... | |
unsigned int | low_word () const |
Get the low 4 bytes of the UTC time. More... | |
unsigned char | high_byte () const |
Get the high byte of the UTC time. More... | |
long long | centiseconds () const |
Get the UTC time as centiseconds. More... | |
unsigned char * | buffer () |
Pointer to start of time in memory. More... | |
unsigned char * | buffer () const |
Pointer to start of time in memory This is used for calls to the OS that pass a UTC. | |
Static Public Member Functions | |
static UTCTime | now () |
Get a UTCTime representing the current time. More... | |
Protected Attributes | |
long long | _centiseconds |
Number of centiseconds since Midnight Jan 1st 1900. | |
Class to handle the 5 byte times.
The 5 byte time is used for time/date stamps on files on RISCOS. It is the number of centi-seconds from Midnight on 1st Jan 1900.
UTCTime::UTCTime | ( | long long | csecs | ) |
Construct a UTC time for the given number of centiseconds.
csecs | number of centiseconds since Midnight, 1st Jan 1990 |
UTCTime::UTCTime | ( | unsigned int | load_address, |
unsigned int | exec_address | ||
) |
Construct a UTC time give file system catalog information.
load_address | load address of the file |
exec_address | execute address of the file |
|
inline |
Pointer to start of time in memory.
This is used for calls to the OS that pass a UTC.
|
inline |
Get the UTC time as centiseconds.
|
inline |
Get the high byte of the UTC time.
|
inline |
Get the low 4 bytes of the UTC time.
|
static |
std::string UTCTime::text | ( | ) | const |
Get time/date as text in standard format.
The standard format is read from the system variable Sys$DateFormat
std::string UTCTime::text | ( | const std::string & | format | ) | const |
Get time/date as text in specified format.
Text from the format is copied directly into the result unless it starts with a "%" in which case the following is substituted. CS Centiseconds SE Seconds MI Minutes 12 Hours in 12 hour format 24 Hours in 24 hour format AM AM or PM indicator (in local language) PM AM or PM indicator (in local language) WE Weekday - full (in local language) W3 Weekday - short (in local language) WN Weekday - number DY Day of the month (in local language) ST Ordinal pre/suffix (in local language) (e.g st nd rd th) MO Month name - full (in local language) M3 Month name - short (in local language) MN Month - number CE Century YR Year within century WK Week of year (using local start of week) DN Day of the year TZ Timezone 0 Insert an ASCII 0 zero byte % Insert a ''