28 #include <boost/date_time/posix_time/posix_time.hpp> 36 class DateTime :
public boost::posix_time::ptime {
141 #endif // COMMON_TIME_H
A class holding an UTF-8 string.
A date/time object, storing a specific point in time.
UString formatDateTimeISO(uint32 sep=0, uint32 sepDate=0, uint32 sepTime=0) const
Return a string representation of the date and time in ISO 8601 format.
uint8 getSecond() const
Return the second (0..60).
void getDateTime(uint16 &year, uint8 &month, uint8 &day, uint8 &hour, uint8 &minute, uint8 &second) const
Return the year, month (1..12), day (1..31), hour (0..23), minute (0..59) and second (0...
uint16 getYear() const
Return the year in the Gregorian calendar.
The nondescript local time zone.
void getTime(uint8 &hour, uint8 &minute, uint8 &second) const
Return the hour in the 24-hour clock (0..23), minute (0..59) and second (0..60).
Low-level type definitions to handle fixed width types portably.
uint8 getMonth() const
Return the month in the Gregorian calendar (1..12).
UString formatDateISO(uint32 sep=0) const
Return a string representation of the date in ISO 8601 format.
void getDate(uint16 &year, uint8 &month, uint8 &day) const
Return the year, month (1..12) and day (1..31) in the Gregorian calendar.
uint8 getHour() const
Return the hour in the 24-hour clock (0..23).
DateTime(TimeZone zone)
Create a DateTime object from the current date and time.
Coordinated Universal Time (UTC).
uint8 getDay() const
Return the day in the Gregorian calendar (1..31).
uint8 getMinute() const
Return the minute (0..59).
UString formatTimeISO(uint32 sep=0) const
Return a string representation of the time in ISO 8601 format.