Skip to content

Commit 523bc79

Browse files
committed
集成时区包
1 parent e88e606 commit 523bc79

File tree

7 files changed

+64
-590195
lines changed

7 files changed

+64
-590195
lines changed

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ before_deploy:
2121
- GOARCH=amd64 GOOS=linux go build -o godoc_linux_amd64 -ldflags="-w -X main.VERSION=$TAG -X 'main.BUILD_TIME=`date`' -X 'main.GO_VERSION=`go version`'"
2222
- GOARCH=amd64 GOOS=darwin go build -o godoc_darwin_amd64 -ldflags="-w -X main.VERSION=$TAG -X 'main.BUILD_TIME=`date`' -X 'main.GO_VERSION=`go version`'"
2323
- GOARCH=amd64 GOOS=windows go build -o godoc_windows_amd64.exe -ldflags="-w -X main.VERSION=$TAG -X 'main.BUILD_TIME=`date`' -X 'main.GO_VERSION=`go version`'"
24-
- rm -rf commands controllers models modules routers tasks vendor docs search data utils graphics .git Godeps uploads/* .gitignore .travis.yml Dockerfile gide.yaml LICENSE main.go README.md conf/enumerate.go conf/mail.go install.lock *.md
24+
- rm -rf commands controllers models modules routers tasks vendor docs search utils graphics .git Godeps uploads/* .gitignore .travis.yml Dockerfile gide.yaml LICENSE main.go README.md conf/enumerate.go conf/mail.go install.lock *.md
2525
- zip -r godoc_linux_amd64.zip conf logs static uploads views godoc_linux_amd64
2626
- zip -r godoc_darwin_amd64.zip conf logs static uploads views godoc_darwin_amd64
2727
- zip -r godoc_windows_amd64.zip conf logs static uploads views godoc_windows_amd64.exe

commands/command.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import (
1414
"github.com/lifei6671/godoc/conf"
1515

1616
"github.com/lifei6671/gocaptcha"
17+
"syscall"
1718
)
1819

1920
// RegisterDataBase 注册数据库
@@ -32,7 +33,6 @@ func RegisterDataBase() {
3233
orm.RegisterDataBase("default", "mysql", dataSource)
3334

3435
orm.DefaultTimeLoc, _ = time.LoadLocation(timezone)
35-
3636
}
3737

3838
// RegisterModel 注册Model
@@ -146,6 +146,7 @@ func RegisterFunction() {
146146
}
147147

148148
func init() {
149+
syscall.Setenv("ZONEINFO","./lib/time/zoneinfo.zip")
149150
gocaptcha.ReadFonts("./static/fonts", ".ttf")
150151
gob.Register(models.Member{})
151152
}

0 commit comments

Comments
 (0)