集成时区包

This commit is contained in:
Minho
2017-05-09 10:18:10 +08:00
parent e88e60622d
commit 523bc7959e
7 changed files with 64 additions and 590195 deletions

View File

@@ -14,6 +14,7 @@ import (
"github.com/lifei6671/godoc/conf"
"github.com/lifei6671/gocaptcha"
"syscall"
)
// RegisterDataBase 注册数据库
@@ -32,7 +33,6 @@ func RegisterDataBase() {
orm.RegisterDataBase("default", "mysql", dataSource)
orm.DefaultTimeLoc, _ = time.LoadLocation(timezone)
}
// RegisterModel 注册Model
@@ -146,6 +146,7 @@ func RegisterFunction() {
}
func init() {
syscall.Setenv("ZONEINFO","./lib/time/zoneinfo.zip")
gocaptcha.ReadFonts("./static/fonts", ".ttf")
gob.Register(models.Member{})
}