summaryrefslogtreecommitdiffstats
path: root/pendulum/tz/zoneinfo/__init__.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2021-01-30 08:13:47 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2021-01-30 08:13:47 +0000
commit1199780155f666b6806d563a29d093a251664009 (patch)
tree68716d9c1ee3205f474a04d74d5653eddf94a9f2 /pendulum/tz/zoneinfo/__init__.py
parentInitial commit. (diff)
downloadpendulum-1199780155f666b6806d563a29d093a251664009.tar.xz
pendulum-1199780155f666b6806d563a29d093a251664009.zip
Adding upstream version 2.1.2.upstream/2.1.2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'pendulum/tz/zoneinfo/__init__.py')
-rw-r--r--pendulum/tz/zoneinfo/__init__.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/pendulum/tz/zoneinfo/__init__.py b/pendulum/tz/zoneinfo/__init__.py
new file mode 100644
index 0000000..890351a
--- /dev/null
+++ b/pendulum/tz/zoneinfo/__init__.py
@@ -0,0 +1,16 @@
+from .reader import Reader
+from .timezone import Timezone
+
+
+def read(name, extend=True): # type: (str, bool) -> Timezone
+ """
+ Read the zoneinfo structure for a given timezone name.
+ """
+ return Reader(extend=extend).read_for(name)
+
+
+def read_file(path, extend=True): # type: (str, bool) -> Timezone
+ """
+ Read the zoneinfo structure for a given path.
+ """
+ return Reader(extend=extend).read(path)