dcicutils 8.8.3.1b13__py3-none-any.whl → 8.8.3.1b14__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 +8 -2
- {dcicutils-8.8.3.1b13.dist-info → dcicutils-8.8.3.1b14.dist-info}/METADATA +1 -1
- {dcicutils-8.8.3.1b13.dist-info → dcicutils-8.8.3.1b14.dist-info}/RECORD +6 -6
- {dcicutils-8.8.3.1b13.dist-info → dcicutils-8.8.3.1b14.dist-info}/LICENSE.txt +0 -0
- {dcicutils-8.8.3.1b13.dist-info → dcicutils-8.8.3.1b14.dist-info}/WHEEL +0 -0
- {dcicutils-8.8.3.1b13.dist-info → dcicutils-8.8.3.1b14.dist-info}/entry_points.txt +0 -0
dcicutils/datetime_utils.py
CHANGED
@@ -185,15 +185,21 @@ def format_datetime(value: datetime,
|
|
185
185
|
notz = False
|
186
186
|
elif tz is False:
|
187
187
|
notz = True
|
188
|
+
if noseconds is True:
|
189
|
+
ms = False
|
188
190
|
value = value.astimezone(tz)
|
189
191
|
if iso:
|
190
192
|
if notz is True:
|
191
193
|
value = value.replace(tzinfo=None)
|
192
194
|
if not (ms is True):
|
193
195
|
value = value.replace(microsecond=0)
|
196
|
+
if noseconds is True:
|
197
|
+
if notz is True:
|
198
|
+
return value.strftime(f"%Y-%m-%dT%H:%M")
|
199
|
+
tz = value.strftime("%z")
|
200
|
+
tz = tz[:3] + ":" + tz[3:]
|
201
|
+
return value.strftime(f"%Y-%m-%dT%H:%M") + tz
|
194
202
|
return value.isoformat()
|
195
|
-
if noseconds is True:
|
196
|
-
ms = False
|
197
203
|
if verbose:
|
198
204
|
return value.strftime(
|
199
205
|
f"{'' if noday is True else '%A, '}%B %-d, %Y{'' if noseparator is True else ' |'}"
|
@@ -12,7 +12,7 @@ dcicutils/contribution_utils.py,sha256=vYLS1JUB3sKd24BUxZ29qUBqYeQBLK9cwo8x3k64u
|
|
12
12
|
dcicutils/creds_utils.py,sha256=xrLekD49Ex0GOpL9n7LlJA4gvNcY7txTVFOSYD7LvEU,11113
|
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=S3SCmpqv_Z0CS8_yqZsoN4aL1Epu8jwKs6DDYs96OdM,9427
|
16
16
|
dcicutils/deployment_utils.py,sha256=sKv8Jb-_Zw2aH3OAywRlsre-Cqm3a7fEGG3_1PT-r-s,69908
|
17
17
|
dcicutils/diff_utils.py,sha256=sQx-yz56DHAcQWOChYbAG3clXu7TbiZKlw-GggeveO0,8118
|
18
18
|
dcicutils/docker_utils.py,sha256=30gUiqz7X9rJwSPXTPn4ewjQibUgoSJqhP9o9vn5X-A,1747
|
@@ -72,8 +72,8 @@ dcicutils/trace_utils.py,sha256=g8kwV4ebEy5kXW6oOrEAUsurBcCROvwtZqz9fczsGRE,1769
|
|
72
72
|
dcicutils/validation_utils.py,sha256=cMZIU2cY98FYtzK52z5WUYck7urH6JcqOuz9jkXpqzg,14797
|
73
73
|
dcicutils/variant_utils.py,sha256=2H9azNx3xAj-MySg-uZ2SFqbWs4kZvf61JnK6b-h4Qw,4343
|
74
74
|
dcicutils/zip_utils.py,sha256=rnjNv_k6L9jT2SjDSgVXp4BEJYLtz9XN6Cl2Fy-tqnM,2027
|
75
|
-
dcicutils-8.8.3.
|
76
|
-
dcicutils-8.8.3.
|
77
|
-
dcicutils-8.8.3.
|
78
|
-
dcicutils-8.8.3.
|
79
|
-
dcicutils-8.8.3.
|
75
|
+
dcicutils-8.8.3.1b14.dist-info/LICENSE.txt,sha256=qnwSmfnEWMl5l78VPDEzAmEbLVrRqQvfUQiHT0ehrOo,1102
|
76
|
+
dcicutils-8.8.3.1b14.dist-info/METADATA,sha256=Od4jg67J1tt_7cxv1n04p8PGmpjbnlfi9-EKsMS-GKk,3357
|
77
|
+
dcicutils-8.8.3.1b14.dist-info/WHEEL,sha256=7Z8_27uaHI_UZAc4Uox4PpBhQ9Y5_modZXWMxtUi4NU,88
|
78
|
+
dcicutils-8.8.3.1b14.dist-info/entry_points.txt,sha256=51Q4F_2V10L0282W7HFjP4jdzW4K8lnWDARJQVFy_hw,270
|
79
|
+
dcicutils-8.8.3.1b14.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|