Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

デフォルトTZをAsia/Tokyoにしているせいで他のタイムゾーンで正常に動作するのか未確認 #9

Open
pollenjp opened this issue Aug 20, 2022 · 0 comments

Comments

@pollenjp
Copy link
Owner

pollenjp commented Aug 20, 2022

pomodoro-bot/main.go

Lines 16 to 25 in ae0b55f

location := os.Getenv("TZ")
default_offset := 9*60*60
if len(location) == 0 {
location = "Asia/Tokyo"
}
loc, err := time.LoadLocation(location)
if err != nil {
loc = time.FixedZone(location, default_offset)
}
time.Local = loc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant