convert - String2Time accept HH:mm:ss format #2074
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
4 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: xorm/xorm#2074
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "arturwwl/xorm:time-fix"
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?
resolves #2073
@ -50,1 +52,4 @@
return &dt, nil
} else if len(s) == 8 && s[2] == ':' && s[5] == ':' {
currentDate := time.Now()
dt, err := time.ParseInLocation("15:04:05", s, originalLocation)
Why not just use
convertedLocation
here?It depends on how it should work.
Does DB time should be always in sync with local time?
For example in location
Europe/Warsaw
time depends on date Wiki.Should we expect that something stored in DB (if our DB has
UTC
time) at8AM
should be in Poland(UTC +1/UTC +2
)9AM/10AM
depends on current date?Also when we consider there is posibility that another go program (on other server) acces to this same DB from other location, I think it is clear it should correctly convert that time to local - example in
Asia/Shanghai
this should be shown as4PM
.replaced by #2093
@lunny how it could be replaced by this PR?
#2093 is date format related (
YYYY-mm-dd
) not time format related (HH:ii:ss
).It is completely diffirent.
Please resolve the conflict.
any update?
ccool