Files
zulip/zerver/lib/timezone.py
Anders Kaseorg becef760bf cleanup: Delete leading newlines.
Previous cleanups (mostly the removals of Python __future__ imports)
were done in a way that introduced leading newlines.  Delete leading
newlines from all files, except static/assets/zulip-emoji/NOTICE,
which is a verbatim copy of the Apache 2.0 license.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-08-06 23:29:11 -07:00

11 lines
206 B
Python

from typing import List
import pytz
import datetime
def get_all_timezones() -> List[str]:
return sorted(pytz.all_timezones)
def get_timezone(tz: str) -> datetime.tzinfo:
return pytz.timezone(tz)