Gda.Time

Fields

Name

Type

Access

Description

fraction

int

r/w

fractionnal part of the seconds, in millionth’ of second

hour

int

r/w

hour representation of the time, as a number between 0 and 23

minute

int

r/w

minute representation of the time, as a number between 0 and 59

second

int

r/w

second representation of the time, as a number between 0 and 59

timezone

int

r/w

number of seconds added to the GMT timezone

Methods

class

copy (boxed)

class

free (boxed)

change_timezone (ntz)

valid ()

Details

class Gda.Time

Represents a time information.

classmethod copy(boxed)
Parameters:

boxed (object or None) –

Return type:

object or None

classmethod free(boxed)
Parameters:

boxed (object or None) –

change_timezone(ntz)
Parameters:

ntz (int) – a new timezone to use, in seconds added to GMT

Changes self's timezone (for example to convert from GMT to another time zone). If self's current timezone is unset (i.e. equal to Gda.TIMEZONE_INVALID), then this function simply sets self's timezone attribute; Otherwise, it adds or removes hours, minutes or seconds to reflect the time in the new timezone.

Note: the resulting will always be a valid time.

New in version 5.2.

valid()
Returns:

True if Gda.Time is valid; False otherwise.

Return type:

bool

New in version 4.2.