Millisecond truncation is incorrect
cyyynthia opened this issue · comments
Cynthia commented
Hello, I was testing my TOML parser/encoder against this test suite, and was surprised to find one of the datetime tests for the encoder was failing. After looking at it a bit, and at the repo's README (bold added by me):
Millisecond precision (4 digits) is required for datetimes and times
This seems seems incorrect. Millisecond precision is 3 extra digits (since 1000ms = 1s), which means this fail report seems invalid to me and is asking for sub-millisecond precision:
FAIL valid/datetime/milliseconds
Values for key 'utc1' differ:
Expected: 1987-07-05 17:45:56.1234 +0000 UTC (time.Time)
Your encoder: 1987-07-05 17:45:56.123 +0000 UTC (time.Time)
Martin Tournoij commented
Thanks; I fixed it.