#include <Date_Time.h>
Public Member Functions | |
ACE_Date_Time (void) | |
Constructor initializes current time/date info. | |
ACE_Date_Time (const ACE_Time_Value &timevalue) | |
Constructor initializes with the given ACE_Time_Value. | |
ACE_Date_Time (long day, long month=0, long year=0, long hour=0, long minute=0, long second=0, long microsec=0, long wday=0) | |
void | update (void) |
Update to the current time/date. | |
void | update (const ACE_Time_Value &timevalue) |
Update to the given ACE_Time_Value. | |
long | day (void) const |
Get day. | |
void | day (long day) |
Set day. | |
long | month (void) const |
Get month. | |
void | month (long month) |
Set month. | |
long | year (void) const |
Get year. | |
void | year (long year) |
Set year. | |
long | hour (void) const |
Get hour. | |
void | hour (long hour) |
Set hour. | |
long | minute (void) const |
Get minute. | |
void | minute (long minute) |
Set minute. | |
long | second (void) const |
Get second. | |
void | second (long second) |
Set second. | |
long | microsec (void) const |
Get microsec. | |
void | microsec (long microsec) |
Set microsec. | |
long | weekday (void) const |
Get weekday. | |
void | weekday (long wday) |
Set weekday. | |
Private Attributes | |
long | day_ |
long | month_ |
long | year_ |
long | hour_ |
long | minute_ |
long | second_ |
long | microsec_ |
long | wday_ |
Definition at line 33 of file Date_Time.h.
|
Constructor initializes current time/date info.
Definition at line 54 of file Date_Time.inl. References ACE_TRACE, and update().
|
|
Constructor initializes with the given ACE_Time_Value.
Definition at line 61 of file Date_Time.inl. References ACE_TRACE, and update().
|
|
Constructor with init values, no check for validy Set/get portions of ACE_Date_Time, no check for validity. Definition at line 69 of file Date_Time.inl. References ACE_TRACE.
|
|
Set day.
Definition at line 101 of file Date_Time.inl. References ACE_TRACE, and day_.
|
|
Get day.
Definition at line 93 of file Date_Time.inl. References ACE_TRACE, and day_.
|
|
Set hour.
Definition at line 149 of file Date_Time.inl. References ACE_TRACE, and hour_.
|
|
Get hour.
Definition at line 141 of file Date_Time.inl. References ACE_TRACE, and hour_.
|
|
Set microsec.
Definition at line 197 of file Date_Time.inl. References ACE_TRACE, and microsec_.
|
|
Get microsec.
Definition at line 189 of file Date_Time.inl. References ACE_TRACE, and microsec_.
|
|
Set minute.
Definition at line 165 of file Date_Time.inl. References ACE_TRACE, and minute_.
|
|
Get minute.
Definition at line 157 of file Date_Time.inl. References ACE_TRACE, and minute_.
|
|
Set month.
Definition at line 117 of file Date_Time.inl. References ACE_TRACE, and month_.
|
|
Get month.
Definition at line 109 of file Date_Time.inl. References ACE_TRACE, and month_.
|
|
Set second.
Definition at line 181 of file Date_Time.inl. References ACE_TRACE, and second_.
|
|
Get second.
Definition at line 173 of file Date_Time.inl. References ACE_TRACE, and second_.
|
|
Update to the given ACE_Time_Value.
Definition at line 13 of file Date_Time.inl. References day_, hour_, ACE_OS::localtime_r(), microsec_, minute_, month_, second_, wday_, and year_.
00014 { 00015 #if defined (ACE_HAS_WINCE) 00016 // CE doesn't do localtime(). 00017 FILETIME file_time = timevalue; 00018 FILETIME local_file_time; 00019 SYSTEMTIME sys_time; 00020 ::FileTimeToLocalFileTime (&file_time, &local_file_time); 00021 ::FileTimeToSystemTime (&local_file_time, &sys_time); 00022 this->day_ = sys_time.wDay; 00023 this->month_ = sys_time.wMonth; 00024 this->year_ = sys_time.wYear; 00025 this->hour_ = sys_time.wHour; 00026 this->minute_ = sys_time.wMinute; 00027 this->second_ = sys_time.wSecond; 00028 this->microsec_ = sys_time.wMilliseconds * 1000; 00029 this->wday_ = sys_time.wDayOfWeek; 00030 #else 00031 time_t time = timevalue.sec (); 00032 struct tm tm_time; 00033 ACE_OS::localtime_r (&time, &tm_time); 00034 this->day_ = tm_time.tm_mday; 00035 this->month_ = tm_time.tm_mon + 1; // localtime's months are 0-11 00036 this->year_ = tm_time.tm_year + 1900; // localtime reports years since 1900 00037 this->hour_ = tm_time.tm_hour; 00038 this->minute_ = tm_time.tm_min; 00039 this->second_ = tm_time.tm_sec; 00040 this->microsec_ = timevalue.usec (); 00041 this->wday_ = tm_time.tm_wday; 00042 #endif /* ACE_HAS_WINCE */ 00043 } |
|
Update to the current time/date.
Definition at line 46 of file Date_Time.inl. References ACE_TRACE. Referenced by ACE_Date_Time().
|
|
Set weekday.
Definition at line 213 of file Date_Time.inl. References ACE_TRACE, and wday_.
|
|
Get weekday.
Definition at line 205 of file Date_Time.inl. References ACE_TRACE, and wday_.
|
|
Set year.
Definition at line 133 of file Date_Time.inl. References ACE_TRACE, and year_.
|
|
Get year.
Definition at line 125 of file Date_Time.inl. References ACE_TRACE, and year_.
|
|
Definition at line 108 of file Date_Time.h. |
|
Definition at line 111 of file Date_Time.h. |
|
Definition at line 114 of file Date_Time.h. Referenced by microsec(), and update(). |
|
Definition at line 112 of file Date_Time.h. |
|
Definition at line 109 of file Date_Time.h. |
|
Definition at line 113 of file Date_Time.h. |
|
Definition at line 115 of file Date_Time.h. |
|
Definition at line 110 of file Date_Time.h. |