parse timestamp with milliseconds in tz format #2246
No reviewers
Labels
No Label
backport/done
backport/v1
blocked
db
oracle
db
sqlserver
duplicate
feature
cache
frontport/done
frontport/main
invalid
kind
breaking
kind
bug
kind
build
kind
dependencies
kind
docs
kind
driver
kind
enhancement
kind
feature
kind
performance
kind
proposal
kind
question
kind
refactor
kind
testing
need
feedback
need
test
proposal:accepted
RaspBerry Pi
regression
skip-changelog
upstream
wip
wontfix
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: xorm/xorm#2246
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "agarcia/xorm:fix-parse-timestamp-milliseconds-TZ-format"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. 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 format