From 2bb1f5448a9e40ab39cb631b9d0b200afb7aa8f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jure=20=C5=A0orn?= Date: Mon, 31 Jul 2023 13:46:06 +0200 Subject: [PATCH] Datetime --- README.md | 4 ++-- index.html | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 6f612cb..b172600 100644 --- a/README.md +++ b/README.md @@ -619,8 +619,8 @@ from dateutil.tz import tzlocal, gettz, datetime_exists, resolve_imaginary = timezone() # Timezone with fixed offset from UTC. = tzlocal() # Local timezone. Also gettz(). = gettz('/') # 'Continent/City_Name' timezone or None. - =
.astimezone() # Datetime, converted to the passed timezone. - = .replace(tzinfo=) # Unconverted object with a new timezone. + =
.astimezone([]) # Converts DT to the passed or local timezone. + = .replace(tzinfo=) # Changes object's timezone without conversion. ``` * **Standard library's zoneinfo.ZoneInfo() can be used instead of gettz() on Python 3.9 and later. It requires 'tzdata' package on Windows.** diff --git a/index.html b/index.html index 4112724..6391334 100644 --- a/index.html +++ b/index.html @@ -546,8 +546,8 @@ Point(x=1, y=2 <tzinfo> = timezone(<timedelta>) # Timezone with fixed offset from UTC. <tzinfo> = tzlocal() # Local timezone. Also gettz(). <tzinfo> = gettz('<Continent>/<City>') # 'Continent/City_Name' timezone or None. -<DTa> = <DT>.astimezone(<tzinfo>) # Datetime, converted to the passed timezone. -<Ta/DTa> = <T/DT>.replace(tzinfo=<tzinfo>) # Unconverted object with a new timezone. +<DTa> = <DT>.astimezone([<tzinfo>]) # Converts DT to the passed or local timezone. +<Ta/DTa> = <T/DT>.replace(tzinfo=<tzinfo>) # Changes object's timezone without conversion.