1
This commit is contained in:
parent
9afe1aa679
commit
a26208f76e
@ -281,6 +281,9 @@ func SmartParseTimeToMills(timeStr string) int64 {
|
||||
}
|
||||
} else if StrContains(timeStr, ".") {
|
||||
const layout = "2006-01-02 15:04:05.000"
|
||||
if len(timeStr) > len(layout) {
|
||||
timeStr = timeStr[0:len(layout)]
|
||||
}
|
||||
t, err := time.Parse(layout, timeStr)
|
||||
if err == nil {
|
||||
return t.UnixNano() / int64(time.Millisecond)
|
||||
|
Loading…
x
Reference in New Issue
Block a user