ICalGLib.Timezone¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
class |
|
class |
|
class |
|
class |
|
class |
|
class |
|
class |
|
class |
|
class |
|
class |
|
class |
|
class |
|
class |
|
class |
|
class |
|
class |
|
class |
|
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
- Inherited:
Signals¶
- Inherited:
Fields¶
- Inherited:
Class Details¶
- class ICalGLib.Timezone(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
This is the
ICalGLib.Timezoneinstance.- classmethod array_append_from_vtimezone(timezones, child)¶
- Parameters:
timezones (
ICalGLib.Array) – The timezones to be populatedchild (
ICalGLib.Component) – The component to be appended to timezones
Populate the array of timezones with a component.
note The timezones assumes ownership of the child, thus make sure you pass an unowned
ICalGLib.Component.Added in version 1.0.
- classmethod array_element_at(timezones, index)¶
- Parameters:
timezones (
ICalGLib.Array) – The array to be visitedindex (
int) – The index
- Returns:
The
ICalGLib.Timezoneat the position index in timezones.- Return type:
Gets the
ICalGLib.Timezoneat specified position in array.Added in version 1.0.
- classmethod array_new()¶
- Returns:
Create a new array.
- Return type:
Creates a new array of timezones.
Added in version 1.0.
- classmethod free_builtin_timezones()¶
Frees any builtin timezone information.
Added in version 1.0.
- classmethod free_zone_directory()¶
Frees memory dedicated to the zonefile directory.
Added in version 1.0.
- classmethod get_builtin_timezone(location)¶
- Parameters:
location (
strorNone) – The location representing the timezone- Returns:
The builtin
ICalGLib.Timezonewith the name of location- Return type:
Returns a single builtin timezone, given its Olson city name.
Added in version 1.0.
- classmethod get_builtin_timezone_from_offset(offset, tzname)¶
- Parameters:
offset (
int) – The offset used to get theICalGLib.Timezonetzname (
strorNone) – The referenceICalGLib.Timezonename
- Return type:
Returns a single builtin timezone, given its offset.
Added in version 1.0.
- classmethod get_builtin_timezone_from_tzid(tzid)¶
- Parameters:
- Return type:
Returns a single builtin timezone, given its TZID.
Added in version 1.0.
- classmethod get_builtin_timezones()¶
- Returns:
An
ICalGLib.Arrayof the builtinICalGLib.Timezoneobjects.- Return type:
Returns a list of builtin timezones.
Added in version 1.0.
- classmethod get_builtin_tzdata()¶
- Returns:
Whether to use builtin timezones files.
- Return type:
Gets whether to use builtin timezones files.
Added in version 2.0.
- classmethod get_location_from_vtimezone(component)¶
- Parameters:
component (
ICalGLib.Component) – TheICalGLib.Componentto be queried- Returns:
The location of vtimezone.
- Return type:
Gets the location of the vtimezone in component.
Added in version 2.0.
- classmethod get_tznames_from_vtimezone(component)¶
- Parameters:
component (
ICalGLib.Component) – TheICalGLib.Componentto be queried- Returns:
The name of vtimezone.
- Return type:
Gets the name of the vtimezone in component.
Added in version 2.0.
- classmethod get_utc_timezone()¶
- Returns:
The utc
ICalGLib.Timezone- Return type:
Returns the UTC timezone.
Added in version 1.0.
- classmethod get_zone_directory()¶
- Returns:
The path to look for the zonefiles
- Return type:
Gets the directory to look for the zonefiles.
Added in version 3.0.17.
- classmethod new()¶
- Returns:
The newly created object of the type
ICalGLib.Timezone.- Return type:
The constructor of the type
ICalGLib.Timezone.Added in version 1.0.
- classmethod release_zone_tab()¶
Frees memory dedicated to the zonefile directory.
Added in version 1.0.
- classmethod set_builtin_tzdata(set)¶
- Parameters:
set (
bool) – Whether to use builtin timezones files
Sets whether to use builtin timezones files.
Added in version 2.0.
- classmethod set_tzid_prefix(new_prefix)¶
- Parameters:
new_prefix (
str) – TheICalGLib.Timezoneto be set
Sets the prefix to be used for tzid’s generated from system tzdata. Must be globally unique (such as a domain name owned by the developer of the calling application), and begin and end with forward slashes. Do not change or de-allocate the string buffer after calling this.
Added in version 1.0.
- classmethod set_zone_directory(path)¶
- Parameters:
path (
str) – The path to look for the zonefiles
Sets the directory to look for the zonefiles.
Added in version 1.0.
- copy()¶
- Returns:
The newly created
ICalGLib.Timezonewith the same values as self- Return type:
The clone method for
ICalGLib.Timezone.Added in version 1.0.
- dump_changes(max_year, fp)¶
- Parameters:
- Returns:
1 if success.
- Return type:
Outputs a list of timezone changes for the given timezone to the given file, up to the maximum year given.
Added in version 1.0.
- get_component()¶
- Returns:
The VTIMEZONE component of the self.
- Return type:
Returns the VTIMEZONE component of a timezone.
Added in version 1.0.
- get_display_name()¶
- Returns:
The display name of self
- Return type:
Gets the display name of the self.
Added in version 1.0.
- get_latitude()¶
- Returns:
The latitude of the
ICalGLib.Timezone- Return type:
Returns the latitude of a builtin timezone.
Added in version 1.0.
- get_location()¶
- Returns:
The location of the
ICalGLib.Timezone, orNone- Return type:
Returns the city name of a timezone, or
None, when none is set or when self is alsoNone.Added in version 1.0.
- get_longitude()¶
- Returns:
The longitude of the
ICalGLib.Timezone.- Return type:
Returns the longitude of a builtin timezone.
Added in version 1.0.
- get_tzid()¶
-
Returns the TZID of a timezone, or
None, when none is set or when self is alsoNone.Added in version 1.0.
- get_tznames()¶
-
Returns the TZNAME properties used in the latest STANDARD and DAYLIGHT components. If they are the same it will return just one, e.g. “LMT”. If they are different it will format them like “EST/EDT”. Note that this may also return
None.Added in version 1.0.
- get_utc_offset(tt)¶
- Parameters:
tt (
ICalGLib.TimeorNone) – The local time- Returns:
UTC offset of the self
- is_daylight:
Whether it is day light
- Return type:
Calculates the UTC offset of a given local time in the given timezone. It is the number of seconds to add to UTC to get local time. The is_daylight flag is set to 1 if the time is in daylight-savings time.
Added in version 1.0.
- get_utc_offset_of_utc_time(tt)¶
- Parameters:
tt (
ICalGLib.Time) – The local time- Returns:
UTC offset of the self
- is_daylight:
Whether it is day light, can be
None
- Return type:
Calculates the UTC offset of a given UTC time in the given timezone. It is the number of seconds to add to UTC to get local time. The is_daylight flag is set to 1 if the time is in daylight-savings time.
Added in version 1.0.
- set_component(comp)¶
- Parameters:
comp (
ICalGLib.Component) – The VTIMEZONE component of anICalGLib.Timezone, initializing the tzid, location and tzname fields- Returns:
Whether the action is successful. 1 for success, 0 for failure.
- Return type:
Sets the VTIMEZONE component of
ICalGLib.Timezone, initializing the tzid, location and tzname fields. It returns 1 on success or 0 on failure, i.e. no TZID was found.note The self assumes ownership of the comp, thus make sure you pass an unowned
ICalGLib.Component.Added in version 1.0.