правки
This commit is contained in:
@@ -9,6 +9,7 @@ import (
|
||||
"github.com/NicoNex/echotron/v3"
|
||||
"github.com/TelegramExchange/tgex-backend/tg_bot/backend"
|
||||
"github.com/TelegramExchange/tgex-backend/tg_bot/bot"
|
||||
"github.com/TelegramExchange/tgex-backend/tg_bot/screens/ui"
|
||||
)
|
||||
|
||||
type PlacementDetails struct {
|
||||
@@ -247,16 +248,16 @@ func formatDateTime(value string) string {
|
||||
|
||||
// Try parsing with timezone
|
||||
if parsed, err = time.Parse(time.RFC3339, value); err == nil {
|
||||
return formatCompactDateTime(parsed)
|
||||
return formatCompactDateTime(parsed.In(ui.MskLocation))
|
||||
}
|
||||
if parsed, err = time.Parse(time.RFC3339Nano, value); err == nil {
|
||||
return formatCompactDateTime(parsed)
|
||||
return formatCompactDateTime(parsed.In(ui.MskLocation))
|
||||
}
|
||||
if parsed, err = time.Parse("2006-01-02T15:04:05", value); err == nil {
|
||||
return formatCompactDateTime(parsed)
|
||||
if parsed, err = time.ParseInLocation("2006-01-02T15:04:05", value, ui.MskLocation); err == nil {
|
||||
return formatCompactDateTime(parsed.In(ui.MskLocation))
|
||||
}
|
||||
if parsed, err = time.Parse("2006-01-02", value); err == nil {
|
||||
return formatCompactDateTime(parsed)
|
||||
if parsed, err = time.ParseInLocation("2006-01-02", value, ui.MskLocation); err == nil {
|
||||
return formatCompactDateTime(parsed.In(ui.MskLocation))
|
||||
}
|
||||
return value
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user