roc-lang / basic-webserver

A basic webserver in Roc
https://roc-lang.github.io/basic-webserver/
Universal Permissive License v1.0
76 stars 16 forks source link

toIso8601Str in InternalDateTime does not conform to ISO 8601 Standard #27

Closed imclerran closed 9 months ago

imclerran commented 9 months ago

ISO 8601 says that time should be in the format: hh:mm:ss or hhmmss. A comma or decimal point, for fractions of an hour, minute, or second may be added, but a decimal point should always indicate a fractional amount of the preceding time unit, such as:

In InternalDateTime, the toIso8601Str produces a result of the format YYYY-MM-DDThh:mm.ssZ, which if interpreted by any ISO conformant library, would be interpreted as YYYY-MM-DDThh:mm.mmZ, which of course is not the time represented.

Thus toIso8601Str should be changed to be conformant to the 8601 standard, and format as: YYYY-MM-DDThh:mm:ssZ.