Class for accessing ``tzres.dll``, which contains timezone name related resources. .. versionadded:: 2.5.0
Method | __init__ |
Undocumented |
Method | load |
Load a timezone name from a DLL offset (integer). |
Method | name |
Parse strings as returned from the Windows registry into the time zone name as defined in the registry. |
Class Variable | p |
Undocumented |
Instance Variable |
|
Undocumented |
Instance Variable | tzres |
Undocumented |
Instance Variable | _tzres |
Undocumented |
Load a timezone name from a DLL offset (integer). >>> from dateutil.tzwin import tzres >>> tzr = tzres() >>> print(tzr.load_name(112)) 'Eastern Standard Time' :param offset: A positive integer value referring to a string from the tzres dll. .. note:: Offsets found in the registry are generally of the form ``@tzres.dll,-114``. The offset in this case is 114, not -114.
Parse strings as returned from the Windows registry into the time zone name as defined in the registry. >>> from dateutil.tzwin import tzres >>> tzr = tzres() >>> print(tzr.name_from_string('@tzres.dll,-251')) 'Dateline Daylight Time' >>> print(tzr.name_from_string('Eastern Standard Time')) 'Eastern Standard Time' :param tzname_str: A timezone name string as returned from a Windows registry key. :return: Returns the localized timezone string from tzres.dll if the string is of the form `@tzres.dll,-offset`, else returns the input string.