Tentative tz fix

This commit is contained in:
Hamcha 2019-05-23 10:15:17 +02:00
parent d92104eff3
commit 680e29b85b
Signed by: hamcha
GPG key ID: A40413D21021EAEE

View file

@ -116,9 +116,9 @@ func remind_message(broker *tg.Broker, update tg.APIMessage) {
_, todaym, todayd := time.Now().Date() _, todaym, todayd := time.Now().Date()
_, targetm, targetd := timestamp.Date() _, targetm, targetd := timestamp.Date()
if todaym != targetm || todayd != targetd { if todaym != targetm || todayd != targetd {
whenday = "il " + timestamp.Format("2/1") whenday = "il " + timestamp.In(loc).Format("2/1")
} }
whentime := "alle " + timestamp.Format("15:04:05") whentime := "alle " + timestamp.In(loc).Format("15:04:05")
broker.SendTextMessage(update.Chat, "Ok, vedrò di avvisarti "+whenday+" "+whentime, &tg.MessageOptions{ broker.SendTextMessage(update.Chat, "Ok, vedrò di avvisarti "+whenday+" "+whentime, &tg.MessageOptions{
ReplyID: &update.MessageID, ReplyID: &update.MessageID,
}) })