Skip to content

Commit b5600ea

Browse files
authored
Update DATETIME_FORMAT to clarify it must be UTC (pynamodb#1163)
1 parent 9903c69 commit b5600ea

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pynamodb/constants.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@
9797

9898
# Defaults
9999
DEFAULT_ENCODING = 'utf-8'
100-
DATETIME_FORMAT = '%Y-%m-%dT%H:%M:%S.%f%z'
100+
DATETIME_FORMAT = '%Y-%m-%dT%H:%M:%S.%f+0000'
101101
SERVICE_NAME = 'dynamodb'
102102
HTTP_OK = 200
103103
HTTP_BAD_REQUEST = 400

tests/test_attributes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ def test_utc_date_time_deserialize_pre_1000_not_padded(self):
204204
]
205205
)
206206
def test_utc_date_time_invalid(self, invalid_string):
207-
with pytest.raises(ValueError, match="does not match format"):
207+
with pytest.raises(ValueError, match=r"does not match format '%Y-%m-%dT%H:%M:%S.%f\+0000'"):
208208
self.attr.deserialize(invalid_string)
209209

210210

0 commit comments

Comments
 (0)