Commit 94c4bb7
committed
Update WebexTeamsDateTime
Attempting to apply a timezone to a naive datetime (no tzinfo) raises a Value error in Python v2.7 and v3.5.
ValueError: astimezone() cannot be applied to a naive datetime
Check to see if the datetime has time zone information (tzinfo). If it has timezone info, use the `astimezone()` method to adjust it to ZuluTime. If it does not have timezone info, assume the time is UTC time and add the ZuluTimeZone (raise a warning when this happens).1 parent b63a6db commit 94c4bb7
1 file changed
+12
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| |||
39 | 40 | | |
40 | 41 | | |
41 | 42 | | |
| 43 | + | |
42 | 44 | | |
43 | | - | |
| 45 | + | |
44 | 46 | | |
45 | 47 | | |
46 | 48 | | |
| |||
309 | 311 | | |
310 | 312 | | |
311 | 313 | | |
312 | | - | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
313 | 323 | | |
314 | 324 | | |
315 | 325 | | |
0 commit comments