How to use the tzlocal.helpers._get_timezone function in tzlocal

To help you get started, we’ve selected a few tzlocal examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github trakt / Plex-Trakt-Scrobbler / Trakttv.bundle / Contents / Libraries / Shared / tzlocal / win32.py View on Github external
def reload_localzone():
    """Reload the cached localzone. You need to call this if the timezone has changed."""
    global _cache_tz
    _cache_tz = _get_timezone(get_localzone_name())
github trakt / Plex-Trakt-Scrobbler / Trakttv.bundle / Contents / Libraries / Shared / tzlocal / win32.py View on Github external
def get_localzone():
    """Returns the zoneinfo-based tzinfo object that matches the Windows-configured timezone."""
    global _cache_tz
    if _cache_tz is None:
        _cache_tz = _get_timezone(get_localzone_name())
    return _cache_tz