mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-27 17:50:53 +01:00
更新邮件通知
This commit is contained in:
16
backend/utils/time.go
Normal file
16
backend/utils/time.go
Normal file
@@ -0,0 +1,16 @@
|
||||
package utils
|
||||
|
||||
import "time"
|
||||
|
||||
func GetLocalTime(t time.Time) time.Time {
|
||||
return t.In(time.Local)
|
||||
}
|
||||
|
||||
func GetTimeString(t time.Time) string {
|
||||
return t.Format("2006-01-02 15:04:05")
|
||||
}
|
||||
|
||||
func GetLocalTimeString(t time.Time) string {
|
||||
t = GetLocalTime(t)
|
||||
return GetTimeString(t)
|
||||
}
|
||||
Reference in New Issue
Block a user