mirror of
https://github.com/stashapp/stash.git
synced 2025-12-16 20:07:05 +03:00
Remove railsTimeLayout from ParseDateStringAsTime (#4333)
This commit is contained in:
@@ -5,8 +5,6 @@ import (
|
||||
"time"
|
||||
)
|
||||
|
||||
const railsTimeLayout = "2006-01-02 15:04:05 MST"
|
||||
|
||||
func ParseDateStringAsTime(dateString string) (time.Time, error) {
|
||||
// https://stackoverflow.com/a/20234207 WTF?
|
||||
|
||||
@@ -25,10 +23,5 @@ func ParseDateStringAsTime(dateString string) (time.Time, error) {
|
||||
return t, nil
|
||||
}
|
||||
|
||||
t, e = time.Parse(railsTimeLayout, dateString)
|
||||
if e == nil {
|
||||
return t, nil
|
||||
}
|
||||
|
||||
return time.Time{}, fmt.Errorf("ParseDateStringAsTime failed: dateString <%s>", dateString)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user