“massage” (#603)

This commit is contained in:
HONG YANG 2021-03-10 17:36:58 +08:00 committed by GitHub
parent b85b1e44ef
commit bf1bd3ef5a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -257,6 +257,9 @@ func GetPatAndTimeFormat(tf string) (string, string) {
case "yyyy/mm/dd HH:MM:SS":
pat = `(2[0-9]{3})/(0[1-9]|1[012])/([012][0-9]|3[01])\s([01][0-9]|2[0-4])(:[012345][0-9]){2}`
timeFormat = "2006/01/02 15:04:05"
case "yyyy/mm/dd - HH:MM:SS":
pat = `(2[0-9]{3})/(0[1-9]|1[012])/([012][0-9]|3[01])\s-\s([01][0-9]|2[0-4])(:[012345][0-9]){2}`
timeFormat = "2006/01/02 - 15:04:05"
case "yyyymmdd HH:MM:SS":
pat = `(2[0-9]{3})(0[1-9]|1[012])([012][0-9]|3[01])\s([01][0-9]|2[0-4])(:[012345][0-9]){2}`
timeFormat = "20060102 15:04:05"