From c7e67edc56256ae71ee83b68cb3fcfb9ba1c54f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jure=20=C5=A0orn?= Date: Sat, 16 Mar 2019 17:43:39 +0100 Subject: [PATCH] Timezone --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 67e7592..976dc09 100644 --- a/README.md +++ b/README.md @@ -462,7 +462,7 @@ Datetime ```python from datetime import date, time, datetime, timedelta -from dateutil.tz import UTC, gettz +from dateutil.tz import UTC, tzlocal, gettz ``` ### Constructors @@ -486,7 +486,11 @@ from dateutil.tz import UTC, gettz ### Timezone ```python = UTC # UTC timezone. + = tzlocal() # Local timezone. = gettz('/') # Timezone from 'Continent/City_Name' str. +``` + +```python =
.astimezone() # Datetime, converted to passed timezone. = .replace(tzinfo=) # Unconverted object with new timezone. ```