#include <cctime.h>
Inheritance diagram for CCGmtTime:
Public Member Functions | |
CCGmtTime () | |
Costructor for CCGmtTime.... | |
virtual INT32 | GetMonth () |
Returns the month based on local time, in the range 1 through 12, (1=January). | |
virtual INT32 | GetYear () |
Returns the year based on local time, in the range 1970 through 2038,. | |
virtual void | GetCurrentTime () |
Updates this CCGMTTime object with the date and time now. |
Definition at line 211 of file cctime.h.
|
Costructor for CCGmtTime....
Definition at line 513 of file cctime.cpp. 00514 { 00515 // Force the time to be up-to-the-second 00516 GetCurrentTime(); 00517 }
|
|
Updates this CCGMTTime object with the date and time now.
Reimplemented from CCTimeBase. Definition at line 530 of file cctime.cpp. 00531 { 00532 time_t osBinaryTime; 00533 time(&osBinaryTime); 00534 struct tm *p_tm; 00535 00536 cctime *p_time = GetTimeStruct(); 00537 #ifdef __WXMSW__ 00538 CTime t(osBinaryTime); 00539 p_tm = t.GetGmtTm(NULL); 00540 #else 00541 p_tm=gmtime( &osBinaryTime ); // Convert to local time. 00542 #endif 00543 00544 p_time->tm_sec = p_tm->tm_sec; 00545 p_time->tm_min = p_tm->tm_min; 00546 p_time->tm_hour = p_tm->tm_hour; 00547 p_time->tm_mday = p_tm->tm_mday; 00548 p_time->tm_mon = p_tm->tm_mon; 00549 p_time->tm_year = p_tm->tm_year; 00550 p_time->tm_wday = p_tm->tm_wday; 00551 p_time->tm_yday = p_tm->tm_yday; 00552 p_time->tm_isdst= p_tm->tm_isdst; 00553 }
|
|
Returns the month based on local time, in the range 1 through 12, (1=January).
Reimplemented from CCTimeBase. Definition at line 556 of file cctime.cpp. 00557 { 00558 return CCTimeBase::GetMonth() + 1; 00559 }
|
|
Returns the year based on local time, in the range 1970 through 2038,.
Reimplemented from CCTimeBase. Definition at line 561 of file cctime.cpp. 00562 { 00563 return CCTimeBase::GetYear() + 1900; 00564 }
|