Procházet zdrojové kódy

Add timezone info to message timestamps (#362)

cyberme0w před 2 roky
rodič
revize
4fe1811961
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  1. 1 1
      cmd/messages_text.go

+ 1 - 1
cmd/messages_text.go

@@ -94,7 +94,7 @@ func (mt *MessagesText) createMessage(m discord.Message) {
 }
 
 func (mt *MessagesText) createHeader(w io.Writer, m discord.Message, isReply bool) {
-	time := m.Timestamp.Format(time.Kitchen)
+	time := m.Timestamp.Time().In(time.Local).Format(time.Kitchen)
 
 	if cfg.Timestamps && cfg.TimestampsBeforeAuthor {
 		fmt.Fprintf(w, "[::d]%7s[::-] ", time)