Skip to content

Commit 639d1b8

Browse files
committed
python-stdlib/datetime: add @Property timezone
Signed-off-by: Lorenzo Cappelletti <lorenzo.cappelletti@gmail.com>
1 parent b8caa30 commit 639d1b8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

python-stdlib/datetime/datetime.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,10 @@ def __repr__(self):
255255
def __str__(self):
256256
return self.isoformat(" ")
257257

258+
@property
259+
def tzinfo(self):
260+
return self._tz
261+
258262
def utcoffset(self):
259263
return None if self._tz is None else self._tz.utcoffset(self)
260264

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy