parse timestamp with milliseconds in tz format #2246
Loading…
Reference in New Issue
There is no content yet.
Delete Branch "agarcia/xorm:fix-parse-timestamp-milliseconds-TZ-format"
Deleting a branch is permanent. Although the deleted branch may exist for a short time before cleaning up, in most cases it CANNOT be undone. Continue?
This pr fixes a bug caused when a timestmap in TZ format with milliseconds (
2023-04-05T15:50:48.256816Z
or2023-04-05T15:50:48.256816+08:00
) is being parsed.String2Time
inconvert/time.go
2006-01-02 15:04:05.
is used to parse itT
the parser fails and an error is returnedThis pr adds a check for the
T
and milliseconds in the timestamp, if both conditions are present the date is parsed using the RFC3339 layoutAdded test cases to check timestamps in this format
Solves #2244
fix-parse-timestamp-milliseconds-TZ-formatto fix: parse timestamp with milliseconds in tz formatfix: parse timestamp with milliseconds in tz formatto WIP: parse timestamp with milliseconds in tz formatWIP: parse timestamp with milliseconds in tz formatto parse timestamp with milliseconds in tz formatReviewers