diff --git a/mod_streamSchedule.go b/mod_streamSchedule.go index 988d9be..5c8542f 100644 --- a/mod_streamSchedule.go +++ b/mod_streamSchedule.go @@ -173,7 +173,7 @@ func (m modStreamSchedule) cronUpdateSchedule() { } func (m modStreamSchedule) formatTime(t time.Time) string { - // @attr timezone optional string "UTC" Timezone to display the times in (e.g. "Europe/Berlin") + // @attr timezone optional string "UTC" Timezone to display the times in (e.g. `Europe/Berlin`) tz, err := time.LoadLocation(m.attrs.MustString("timezone", ptrString("UTC"))) if err != nil { log.WithError(err).Fatal("Unable to load timezone") @@ -181,7 +181,7 @@ func (m modStreamSchedule) formatTime(t time.Time) string { return localeStrftime( t.In(tz), - // @attr time_format optional string "%b %d, %Y %I:%M %p" Time format in [limited strftime format](https://github.com/Luzifer/discord-community/blob/master/strftime.go) to use (e.g. "%a. %d.%m. %H:%M Uhr") + // @attr time_format optional string "%b %d, %Y %I:%M %p" Time format in [limited strftime format](https://github.com/Luzifer/discord-community/blob/master/strftime.go) to use (e.g. `%a. %d.%m. %H:%M Uhr`) m.attrs.MustString("time_format", ptrString("%b %d, %Y %I:%M %p")), // @attr locale optional string "en_US" Locale to translate the date to ([supported locales](https://github.com/goodsign/monday/blob/24c0b92f25dca51152defe82cefc7f7fc1c92009/locale.go#L9-L49)) m.attrs.MustString("locale", ptrString("en_US")), diff --git a/wiki/Home.md b/wiki/Home.md index 4263eb9..7885281 100644 --- a/wiki/Home.md +++ b/wiki/Home.md @@ -147,8 +147,8 @@ Posts stream schedule derived from Twitch schedule as embed in Discord channel | `locale` | | string | `en_US` | Locale to translate the date to ([supported locales](https://github.com/goodsign/monday/blob/24c0b92f25dca51152defe82cefc7f7fc1c92009/locale.go#L9-L49)) | | `schedule_entries` | | int64 | `5` | How many schedule entries to add to the embed as fields | | `schedule_past_time` | | duration | `15m` | How long in the past should the schedule contain an entry | -| `time_format` | | string | `%b %d, %Y %I:%M %p` | Time format in [limited strftime format](https://github.com/Luzifer/discord-community/blob/master/strftime.go) to use (e.g. "%a. %d.%m. %H:%M Uhr") | -| `timezone` | | string | `UTC` | Timezone to display the times in (e.g. "Europe/Berlin") | +| `time_format` | | string | `%b %d, %Y %I:%M %p` | Time format in [limited strftime format](https://github.com/Luzifer/discord-community/blob/master/strftime.go) to use (e.g. `%a. %d.%m. %H:%M Uhr`) | +| `timezone` | | string | `UTC` | Timezone to display the times in (e.g. `Europe/Berlin`) |