Skip to content

Commit

Permalink
Fix when TZ environment var is not set
Browse files Browse the repository at this point in the history
  • Loading branch information
priezz authored Dec 19, 2023
1 parent 6f93b51 commit cdde1d5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion freezegun/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
real_datetime = datetime.datetime
real_date_objects = [real_time, real_localtime, real_gmtime, real_monotonic, real_perf_counter, real_strftime, real_date, real_datetime]
real_tzlocal = dateutil.tz.tzlocal
real_tz_env = os.environ["TZ"]
real_tz_env = os.environ["TZ"] if "TZ" in os.environ else ''

if _TIME_NS_PRESENT:
real_time_ns = time.time_ns
Expand Down

0 comments on commit cdde1d5

Please sign in to comment.