dcicutils 8.16.3__py3-none-any.whl → 8.16.3.1b2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- dcicutils/datetime_utils.py +6 -2
- {dcicutils-8.16.3.dist-info → dcicutils-8.16.3.1b2.dist-info}/METADATA +1 -1
- {dcicutils-8.16.3.dist-info → dcicutils-8.16.3.1b2.dist-info}/RECORD +6 -6
- {dcicutils-8.16.3.dist-info → dcicutils-8.16.3.1b2.dist-info}/LICENSE.txt +0 -0
- {dcicutils-8.16.3.dist-info → dcicutils-8.16.3.1b2.dist-info}/WHEEL +0 -0
- {dcicutils-8.16.3.dist-info → dcicutils-8.16.3.1b2.dist-info}/entry_points.txt +0 -0
dcicutils/datetime_utils.py
CHANGED
@@ -53,7 +53,10 @@ def parse_datetime_string(value: str) -> Optional[datetime]:
|
|
53
53
|
if tz_hours < 0 or tz_minutes < 0:
|
54
54
|
tz_hours, tz_minutes = get_local_timezone_hours_minutes()
|
55
55
|
try:
|
56
|
-
|
56
|
+
try:
|
57
|
+
dt = datetime.strptime(value, "%Y-%m-%d %H:%M:%S")
|
58
|
+
except Exception:
|
59
|
+
dt = datetime.strptime(value, "%Y-%m-%d %H:%M:%S.%f")
|
57
60
|
tz = timezone(timedelta(hours=tz_hours, minutes=tz_minutes))
|
58
61
|
return dt.replace(tzinfo=tz)
|
59
62
|
except Exception:
|
@@ -214,11 +217,12 @@ def format_datetime(value: datetime,
|
|
214
217
|
if utc is True:
|
215
218
|
tz = timezone.utc
|
216
219
|
elif not isinstance(tz, timezone):
|
217
|
-
tz = get_local_timezone()
|
218
220
|
if tz is True:
|
219
221
|
notz = False
|
222
|
+
tz = get_local_timezone()
|
220
223
|
elif tz is False:
|
221
224
|
notz = True
|
225
|
+
tz = get_local_timezone()
|
222
226
|
if noseconds is True:
|
223
227
|
ms = False
|
224
228
|
value = value.astimezone(tz)
|
@@ -12,7 +12,7 @@ dcicutils/contribution_utils.py,sha256=vYLS1JUB3sKd24BUxZ29qUBqYeQBLK9cwo8x3k64u
|
|
12
12
|
dcicutils/creds_utils.py,sha256=64BbIfS90T1eJmmQJrDyfrRa3V2F1x7T8lOrEeFfqJY,11127
|
13
13
|
dcicutils/data_readers.py,sha256=6EMrY7TjDE8H7bA_TCWtpLQP7slJ0YTL77_dNh6e7sg,7626
|
14
14
|
dcicutils/data_utils.py,sha256=k2OxOlsx7AJ6jF-YNlMyGus_JqSUBe4_n1s65Mv1gQQ,3098
|
15
|
-
dcicutils/datetime_utils.py,sha256=
|
15
|
+
dcicutils/datetime_utils.py,sha256=xaJ9rzSsk4uBPidwV2sByrl2xcQiFWXTnx6HLpt8EcY,13650
|
16
16
|
dcicutils/deployment_utils.py,sha256=6Sv1cM9T944d_9CTJt8O2RPtpw9MiTIPKw_DgYLOnCU,69916
|
17
17
|
dcicutils/diff_utils.py,sha256=sQx-yz56DHAcQWOChYbAG3clXu7TbiZKlw-GggeveO0,8118
|
18
18
|
dcicutils/docker_utils.py,sha256=30gUiqz7X9rJwSPXTPn4ewjQibUgoSJqhP9o9vn5X-A,1747
|
@@ -75,8 +75,8 @@ dcicutils/trace_utils.py,sha256=g8kwV4ebEy5kXW6oOrEAUsurBcCROvwtZqz9fczsGRE,1769
|
|
75
75
|
dcicutils/validation_utils.py,sha256=cMZIU2cY98FYtzK52z5WUYck7urH6JcqOuz9jkXpqzg,14797
|
76
76
|
dcicutils/variant_utils.py,sha256=2H9azNx3xAj-MySg-uZ2SFqbWs4kZvf61JnK6b-h4Qw,4343
|
77
77
|
dcicutils/zip_utils.py,sha256=_Y9EmL3D2dUZhxucxHvrtmmlbZmK4FpSsHEb7rGSJLU,3265
|
78
|
-
dcicutils-8.16.3.dist-info/LICENSE.txt,sha256=qnwSmfnEWMl5l78VPDEzAmEbLVrRqQvfUQiHT0ehrOo,1102
|
79
|
-
dcicutils-8.16.3.dist-info/METADATA,sha256=
|
80
|
-
dcicutils-8.16.3.dist-info/WHEEL,sha256=7Z8_27uaHI_UZAc4Uox4PpBhQ9Y5_modZXWMxtUi4NU,88
|
81
|
-
dcicutils-8.16.3.dist-info/entry_points.txt,sha256=W6kEWdUJk9tQ4myAgpehPdebcwvCAZ7UgB-wyPgDUMg,335
|
82
|
-
dcicutils-8.16.3.dist-info/RECORD,,
|
78
|
+
dcicutils-8.16.3.1b2.dist-info/LICENSE.txt,sha256=qnwSmfnEWMl5l78VPDEzAmEbLVrRqQvfUQiHT0ehrOo,1102
|
79
|
+
dcicutils-8.16.3.1b2.dist-info/METADATA,sha256=KCIlAtfmDDJJeXvYU52_wFxgz59pKV03l1OT2ADv2b0,3493
|
80
|
+
dcicutils-8.16.3.1b2.dist-info/WHEEL,sha256=7Z8_27uaHI_UZAc4Uox4PpBhQ9Y5_modZXWMxtUi4NU,88
|
81
|
+
dcicutils-8.16.3.1b2.dist-info/entry_points.txt,sha256=W6kEWdUJk9tQ4myAgpehPdebcwvCAZ7UgB-wyPgDUMg,335
|
82
|
+
dcicutils-8.16.3.1b2.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|