File tree Expand file tree Collapse file tree 1 file changed +14
-17
lines changed Expand file tree Collapse file tree 1 file changed +14
-17
lines changed Original file line number Diff line number Diff line change 1
1
import datetime
2
2
3
- try :
4
- from pytz import utc
5
- except ImportError :
6
- # If pytz is not installed, let's polyfill a UTC timezone so it all just works
7
- # This code below is from the python documentation for tzinfo: https://docs.python.org/2.3/lib/datetime-tzinfo.html
8
- ZERO = datetime .timedelta (0 )
9
- HOUR = datetime .timedelta (hours = 1 )
10
3
11
- # A UTC class.
4
+ # This code below is from the python documentation for tzinfo: https://docs.python.org/2.3/lib/datetime-tzinfo.html
5
+ ZERO = datetime .timedelta (0 )
6
+ HOUR = datetime .timedelta (hours = 1 )
12
7
13
- class UTC (datetime .tzinfo ):
14
- """UTC"""
8
+ # A UTC class.
15
9
16
- def utcoffset ( self , dt ):
17
- return ZERO
10
+ class UTC ( datetime . tzinfo ):
11
+ """UTC"""
18
12
19
- def tzname (self , dt ):
20
- return "UTC"
13
+ def utcoffset (self , dt ):
14
+ return ZERO
21
15
22
- def dst (self , dt ):
23
- return ZERO
16
+ def tzname (self , dt ):
17
+ return "UTC"
24
18
25
- utc = UTC ()
19
+ def dst (self , dt ):
20
+ return ZERO
21
+
22
+ utc = UTC ()
26
23
27
24
TABLEAU_DATE_FORMAT = "%Y-%m-%dT%H:%M:%SZ"
28
25
You can’t perform that action at this time.
0 commit comments