Added custom date type

This commit is contained in:
2025-06-17 10:11:10 +02:00
parent bac8c69382
commit 4844e946d3
3 changed files with 41 additions and 9 deletions

View File

@@ -128,9 +128,8 @@ func GetWeather(city *types.City, apiKey string) (types.Weather, error) {
}
// Format UNIX timestamp as 'YYYY-MM-DD'
// unixTs, _ := strconv.Atoi(weather.Current.Timestamp)
utcTime := time.Unix(int64(weather.Current.Timestamp), 0)
weatherDate := utcTime.UTC()
weatherDate := &types.ZephyrDate{Time: utcTime.UTC()}
// Set condition accordingly to weather description
var condition string