github.com/wfusion/gofusion@v1.1.14/common/constant/time_format.go (about) 1 package constant 2 3 import ( 4 "time" 5 ) 6 7 const ( 8 StdDateLayout = "2006-01-02" 9 StdTimeLayout = "2006-01-02 15:04:05" 10 StdTimeWithZLayout = "2006-01-02T15:04:05Z" 11 StdTimeMSLayout = "2006-01-02 15:04:05.999999" 12 ) 13 14 const ( 15 DefaultTimezone = "Asia/Shanghai" 16 ) 17 18 func DefaultLocation() *time.Location { 19 loc, err := time.LoadLocation(DefaultTimezone) 20 if err != nil { 21 panic(err) 22 } 23 return loc 24 }