glib.date_time.DateTime is a structure that combines a Gregorian date and time
into a single structure.
glib.date_time.DateTime provides many conversion and methods to manipulate dates and times.
Time precision is provided down to microseconds and the time can range
(proleptically) from 0001-01-01 00:00:00 to 9999-12-31 23:59:59.999999.
glib.date_time.DateTime follows POSIX time in the sense that it is oblivious to leap
seconds.
glib.date_time.DateTime is an immutable object; once it has been created it cannot
be modified further. All modifiers will create a new glib.date_time.DateTime.
Nearly all such functions can fail due to the date or time going out
of range, in which case null will be returned.
Many parts of the API may produce non-obvious results. As an
example, adding two months to January 31st will yield March 31st
whereas adding one month and then one month again will yield either
March 28th or March 29th. Also note that adding 24 hours is not
always the same as adding one day (since days containing daylight
savings time transitions are either 23 or 25 hours in length).
glib.date_time.DateTime is a structure that combines a Gregorian date and time into a single structure.
glib.date_time.DateTime provides many conversion and methods to manipulate dates and times. Time precision is provided down to microseconds and the time can range (proleptically) from 0001-01-01 00:00:00 to 9999-12-31 23:59:59.999999. glib.date_time.DateTime follows POSIX time in the sense that it is oblivious to leap seconds.
glib.date_time.DateTime is an immutable object; once it has been created it cannot be modified further. All modifiers will create a new glib.date_time.DateTime. Nearly all such functions can fail due to the date or time going out of range, in which case null will be returned.
glib.date_time.DateTime is reference counted: the reference count is increased by calling glib.date_time.DateTime.ref_ and decreased by calling glib.date_time.DateTime.unref. When the reference count drops to 0, the resources allocated by the glib.date_time.DateTime structure are released.
Many parts of the API may produce non-obvious results. As an example, adding two months to January 31st will yield March 31st whereas adding one month and then one month again will yield either March 28th or March 29th. Also note that adding 24 hours is not always the same as adding one day (since days containing daylight savings time transitions are either 23 or 25 hours in length).