mirror of
https://github.com/ddworken/hishtory.git
synced 2025-01-11 16:58:47 +01:00
the bug is with UTC, does this fix it?
This commit is contained in:
parent
d39ca42cea
commit
7d2eb878ac
@ -143,6 +143,14 @@ func parseTimeGenerously(input string) (time.Time, error) {
|
|||||||
if err == nil {
|
if err == nil {
|
||||||
return t.Add(time.Hour), nil
|
return t.Add(time.Hour), nil
|
||||||
}
|
}
|
||||||
|
t, err = time.Parse("2006-01-02T15:04:05 1700", inputWithTimeZone)
|
||||||
|
if err == nil {
|
||||||
|
return t.Add(time.Hour), nil
|
||||||
|
}
|
||||||
|
t, err = time.Parse("2006-01-02T15:04 1700", inputWithTimeZone)
|
||||||
|
if err == nil {
|
||||||
|
return t.Add(time.Hour), nil
|
||||||
|
}
|
||||||
t, err = time.Parse("2006-01-02", input)
|
t, err = time.Parse("2006-01-02", input)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
return t.Local(), nil
|
return t.Local(), nil
|
||||||
|
Loading…
Reference in New Issue
Block a user