Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e57053d

Browse files
committed
Fix #5543: Handle timezone in num2date
1 parent aceb626 commit e57053d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/matplotlib/dates.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ def _from_ordinalf(x, tz=None):
281281
elif dt.microsecond > 999990:
282282
dt += datetime.timedelta(microseconds=1e6 - dt.microsecond)
283283

284-
return dt
284+
return dt.astimezone(tz)
285285

286286

287287
# a version of _from_ordinalf that can operate on numpy arrays

0 commit comments

Comments
 (0)