fixed timeutil to set UTC zone correctly
UTC will actually be set new when nothing is inserted moved initUpdate() to the top of main and finish as first order of operations
This commit is contained in:
parent
1f5f10f545
commit
218916e831
2 changed files with 2 additions and 1 deletions
|
|
@ -19,6 +19,7 @@ func init() {
|
||||||
loc, err := time.LoadLocation(timezone)
|
loc, err := time.LoadLocation(timezone)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Printf("Failed to load timezone, set as UTC")
|
log.Printf("Failed to load timezone, set as UTC")
|
||||||
|
loc = time.UTC
|
||||||
}
|
}
|
||||||
Location = loc
|
Location = loc
|
||||||
}
|
}
|
||||||
|
|
|
||||||
2
main.go
2
main.go
|
|
@ -104,7 +104,7 @@ func init() {
|
||||||
}
|
}
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
go func() { initUpdate() }()
|
initUpdate()
|
||||||
go BotStart.Start()
|
go BotStart.Start()
|
||||||
scheduleTimetableUpdate()
|
scheduleTimetableUpdate()
|
||||||
sigChan := make(chan os.Signal, 1)
|
sigChan := make(chan os.Signal, 1)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue