We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d856efa commit 45d12d4Copy full SHA for 45d12d4
tests/parser_tests.py
@@ -224,6 +224,12 @@ def test_parse_timestamp(self):
224
self.parser.parse("{:f}123456".format(float_timestamp), "X"), self.expected
225
)
226
227
+ negative_timestamp = -1565358758
228
+ self.expected = datetime.fromtimestamp(negative_timestamp, tz=tz_utc)
229
+ self.assertEqual(
230
+ self.parser.parse("{:d}".format(negative_timestamp), "X"), self.expected
231
+ )
232
+
233
# NOTE: timestamps cannot be parsed from natural language strings (by removing the ^...$) because it will
234
# break cases like "15 Jul 2000" and a format list (see issue #447)
235
with self.assertRaises(ParserError):
0 commit comments