summaryrefslogtreecommitdiffstats
path: root/docs/docs/introduction.md
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-01-05 10:38:34 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-01-05 10:38:34 +0000
commite3bdad36cc3a1a00c1e6772ca1c1898085ab73e0 (patch)
tree34512072a667ae716fd262e7b37e733e60fe4d89 /docs/docs/introduction.md
parentAdding upstream version 2.1.2. (diff)
downloadpendulum-e3bdad36cc3a1a00c1e6772ca1c1898085ab73e0.tar.xz
pendulum-e3bdad36cc3a1a00c1e6772ca1c1898085ab73e0.zip
Adding upstream version 3.0.0~a1.upstream/3.0.0_a1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'docs/docs/introduction.md')
-rw-r--r--docs/docs/introduction.md21
1 files changed, 21 insertions, 0 deletions
diff --git a/docs/docs/introduction.md b/docs/docs/introduction.md
new file mode 100644
index 0000000..fbbab97
--- /dev/null
+++ b/docs/docs/introduction.md
@@ -0,0 +1,21 @@
+# Introduction
+
+Pendulum is a Python package to ease datetimes manipulation.
+
+It provides classes that are drop-in replacements for the native ones (they inherit from them).
+
+Special care has been taken to ensure timezones are handled correctly,
+and are based on the underlying `tzinfo` implementation.
+For example, all comparisons are done in `UTC` or in the timezone of the datetime being used.
+
+```python
+>>> import pendulum
+
+>>> dt_toronto = pendulum.datetime(2012, 1, 1, tz='America/Toronto')
+>>> dt_vancouver = pendulum.datetime(2012, 1, 1, tz='America/Vancouver')
+
+>>> print(dt_vancouver.diff(dt_toronto).in_hours())
+3
+```
+
+The default timezone, except when using the `now()`, method will always be `UTC`.