mirror of
https://github.com/casdoor/casdoor.git
synced 2025-05-23 02:35:49 +08:00
17 lines
264 B
Go
17 lines
264 B
Go
package util
|
|
|
|
import (
|
|
"strconv"
|
|
"time"
|
|
)
|
|
|
|
func GetCurrentTime() string {
|
|
timestamp := time.Now().Unix()
|
|
tm := time.Unix(timestamp, 0)
|
|
return tm.Format(time.RFC3339)
|
|
}
|
|
|
|
func GetCurrentUnixTime() string {
|
|
return strconv.FormatInt(time.Now().UnixNano(), 10)
|
|
}
|