16 lines
222 B
Go
16 lines
222 B
Go
package core
|
|
|
|
import "time"
|
|
|
|
const (
|
|
timeFmt = "2006-01-02 15:04:05"
|
|
fileFmt = "20060102_150405"
|
|
)
|
|
|
|
func Now() string {
|
|
return time.Now().Format(timeFmt)
|
|
}
|
|
|
|
func FileName() string {
|
|
return time.Now().Format(fileFmt)
|
|
}
|