#include <Date_Time.h>
Public Methods | |
| ACE_Date_Time (void) | |
| Constructor initializes current time/date info. More... | |
| 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) | |
| Constructor with init values, no check for validy Set/get portions of ACE_Date_Time, no check for validity. More... | |
| void | update (void) |
| Update to the current time/date. More... | |
| void | update (const ACE_Time_Value &timevalue) |
| Update to the given ACE_Time_Value. More... | |
| long | day (void) const |
| Get day. More... | |
| void | day (long day) |
| Set day. More... | |
| long | month (void) const |
| Get month. More... | |
| void | month (long month) |
| Set month. More... | |
| long | year (void) const |
| Get year. More... | |
| void | year (long year) |
| Set year. More... | |
| long | hour (void) const |
| Get hour. More... | |
| void | hour (long hour) |
| Set hour. More... | |
| long | minute (void) const |
| Get minute. More... | |
| void | minute (long minute) |
| Set minute. More... | |
| long | second (void) const |
| Get second. More... | |
| void | second (long second) |
| Set second. More... | |
| long | microsec (void) const |
| Get microsec. More... | |
| void | microsec (long microsec) |
| Set microsec. More... | |
| long | weekday (void) const |
| Get weekday. More... | |
| void | weekday (long wday) |
| Set weekday. More... | |
Private Attributes | |
| long | day_ |
| long | month_ |
| long | year_ |
| long | hour_ |
| long | minute_ |
| long | second_ |
| long | microsec_ |
| long | wday_ |
Definition at line 31 of file Date_Time.h.
|
|
Constructor initializes current time/date info.
Definition at line 31 of file Date_Time.i. 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 39 of file Date_Time.i. References ACE_TRACE.
|
|
|
Set day.
Definition at line 71 of file Date_Time.i. References ACE_TRACE, day, and day_.
|
|
|
Get day.
Definition at line 63 of file Date_Time.i. References ACE_TRACE, and day_. Referenced by day.
|
|
|
Set hour.
Definition at line 119 of file Date_Time.i. References ACE_TRACE, hour, and hour_.
|
|
|
Get hour.
Definition at line 111 of file Date_Time.i. References ACE_TRACE, and hour_. Referenced by hour.
|
|
|
Set microsec.
Definition at line 167 of file Date_Time.i. References ACE_TRACE, microsec, and microsec_.
|
|
|
Get microsec.
Definition at line 159 of file Date_Time.i. References ACE_TRACE, and microsec_. Referenced by microsec.
|
|
|
Set minute.
Definition at line 135 of file Date_Time.i. References ACE_TRACE, minute, and minute_.
|
|
|
Get minute.
Definition at line 127 of file Date_Time.i. References ACE_TRACE, and minute_. Referenced by minute.
|
|
|
Set month.
Definition at line 87 of file Date_Time.i. References ACE_TRACE, month, and month_.
|
|
|
Get month.
Definition at line 79 of file Date_Time.i. References ACE_TRACE, and month_. Referenced by month.
|
|
|
Set second.
Definition at line 151 of file Date_Time.i. References ACE_TRACE, second, and second_.
|
|
|
Get second.
Definition at line 143 of file Date_Time.i. References ACE_TRACE, and second_. Referenced by second.
|
|
|
Update to the given ACE_Time_Value.
Definition at line 7 of file Date_Time.i. References day_, hour_, ACE_OS::localtime_r, microsec_, minute_, month_, ACE_Time_Value::sec, second_, ACE_Time_Value::usec, wday_, and year_.
00008 {
00009 time_t time = timevalue.sec ();
00010 struct tm tm_time;
00011 ACE_OS::localtime_r (&time, &tm_time);
00012 this->day_ = tm_time.tm_mday;
00013 this->month_ = tm_time.tm_mon + 1; // localtime's months are 0-11
00014 this->year_ = tm_time.tm_year + 1900; // localtime reports years since 1900
00015 this->hour_ = tm_time.tm_hour;
00016 this->minute_ = tm_time.tm_min;
00017 this->second_ = tm_time.tm_sec;
00018 this->microsec_ = timevalue.usec ();
00019 this->wday_ = tm_time.tm_wday;
00020 }
|
|
|
Update to the current time/date.
Definition at line 23 of file Date_Time.i. References ACE_TRACE, and ACE_OS::gettimeofday. Referenced by ACE_Date_Time.
00024 {
00025 ACE_TRACE ("ACE_Date_Time::update");
00026
00027 update(ACE_OS::gettimeofday ());
00028 }
|
|
|
Set weekday.
Definition at line 183 of file Date_Time.i. References ACE_TRACE, and wday_.
|
|
|
Get weekday.
Definition at line 175 of file Date_Time.i. References ACE_TRACE, and wday_.
|
|
|
Set year.
Definition at line 103 of file Date_Time.i. References ACE_TRACE, year, and year_.
|
|
|
Get year.
Definition at line 95 of file Date_Time.i. References ACE_TRACE, and year_. Referenced by year.
|
|
|
Definition at line 103 of file Date_Time.h. |
|
|
Definition at line 106 of file Date_Time.h. |
|
|
Definition at line 109 of file Date_Time.h. |
|
|
Definition at line 107 of file Date_Time.h. |
|
|
Definition at line 104 of file Date_Time.h. |
|
|
Definition at line 108 of file Date_Time.h. |
|
|
Definition at line 110 of file Date_Time.h. |
|
|
Definition at line 105 of file Date_Time.h. |
1.2.14 written by Dimitri van Heesch,
© 1997-2002