Skip to content

Commit f18f4c8

Browse files
authored
Change way to check if timezone equals UTC
1 parent 25bf50d commit f18f4c8

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

python/pyspark/sql/types.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
import decimal
2020
import time
2121
import datetime
22-
import dateutil.tz
2322
import calendar
2423
import json
2524
import re
@@ -179,7 +178,7 @@ def fromInternal(self, v):
179178
return datetime.date.fromordinal(v + self.EPOCH_ORDINAL)
180179

181180

182-
_is_utc = datetime.datetime.now(dateutil.tz.tzlocal()).tzname() == "UTC"
181+
_is_utc = time.tzname[time.daylight] == "UTC"
183182

184183

185184
class TimestampType(AtomicType):

0 commit comments

Comments
 (0)