Member Functions
Class
RWDateTime has member functions to compare, store, add, and subtract
RWDateTimes. An
RWDateTime may return specific time units (days, hours, seconds), or fill a
struct tm for any time zone. A complete list of member functions appears in the
SourcePro API Reference Guide.
For example, here is a code fragment that outputs the hour in local and UTC (GMT) zones, and then the complete local time and date.
RWDateTime dt(RWDateTime::setCurrentTime);
cout << dt.dayOfMonth() << endl; // Current day of month
cout << dt.hour() << endl; // Local hour
cout << dt.hourGMT() << endl; // UTC (GMT) hour
dt.writeDate(cout); // Local date
dt.writeTime(cout); // Local time
cout << dt << endl; // Local time and date