Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into docs/mamba/rm
Browse files Browse the repository at this point in the history
  • Loading branch information
mroeschke committed Sep 26, 2024
2 parents e204802 + b948821 commit a387580
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
17 changes: 9 additions & 8 deletions pandas/_testing/contexts.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,15 @@ def set_timezone(tz: str) -> Generator[None, None, None]:
import time

def setTZ(tz) -> None:
if tz is None:
try:
del os.environ["TZ"]
except KeyError:
pass
else:
os.environ["TZ"] = tz
time.tzset()
if hasattr(time, "tzset"):
if tz is None:
try:
del os.environ["TZ"]
except KeyError:
pass
else:
os.environ["TZ"] = tz
time.tzset()

orig_tz = os.environ.get("TZ")
setTZ(tz)
Expand Down
11 changes: 7 additions & 4 deletions pandas/tests/tslibs/test_parsing.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,13 @@
)
def test_parsing_tzlocal_deprecated():
# GH#50791
msg = (
r"Parsing 'EST' as tzlocal \(dependent on system timezone\) "
r"is no longer supported\. "
"Pass the 'tz' keyword or call tz_localize after construction instead"
msg = "|".join(
[
r"Parsing 'EST' as tzlocal \(dependent on system timezone\) "
r"is no longer supported\. "
"Pass the 'tz' keyword or call tz_localize after construction instead",
".*included an un-recognized timezone",
]
)
dtstr = "Jan 15 2004 03:00 EST"

Expand Down

0 comments on commit a387580

Please sign in to comment.