Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions holobot.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,8 @@ func main() {
loc = "Asia/Kolkata"
case "ADT", "AEDT", "ASDT", "AUSTRALIA", "MELBOURNE":
loc = "Australia/Melbourne"
case "BRT", "BRST", "BRASIL", "BRAZILLIAN":
loc = "America/Sao_Paulo"
default:
loc = m[4] //default
}
Expand Down Expand Up @@ -250,12 +252,14 @@ func main() {
ist := t.In(istl).Format("3:04 PM")
adtl, _ := time.LoadLocation("Australia/Melbourne")
adt := t.In(adtl).Format("3:04 PM")
brtl, _ := time.LoadLocation("America/Sao Paulo")
brt := t.In(brtl).Format("3:04 PM")
// and prints them in a table
timeZoneText = fmt.Sprintf(`"%s" is:

| PT | MT | CT | ET | GMT | CET | IST | ADT |
| PT | MT | CT | ET | GMT | CET | IST | ADT | BRT |
|:--------:|:---------:|:--------:|:--------:|:-------:|:------:|:--------:|:--------:|
| %s | %s | %s | %s | %s | %s | %s | %s |`, m[0], pt, mt, ct, et, gmt, cet, ist, adt)
| %s | %s | %s | %s | %s | %s | %s | %s |`, m[0], pt, mt, ct, et, gmt, cet, ist, adt, brt)

// make a debugging message with extra info about the above processes
debuggingTimeZoneText = fmt.Sprintf("➚ **Debugging Info:**\n(%v)\nTime zone I heard (m[4]) was: %v\nLocation (l): %v\nPost.Id: %v\npost.RootId: %v", t, m[4], l, post.Id, post.RootId)
Expand Down