Updates in preparation for adding forecast sources.
This commit is contained in:
19
internal/normalizers/openmeteo/common.go
Normal file
19
internal/normalizers/openmeteo/common.go
Normal file
@@ -0,0 +1,19 @@
|
||||
// FILE: ./internal/normalizers/openmeteo/common.go
|
||||
package openmeteo
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
openmeteo "gitea.maximumdirect.net/ejr/weatherfeeder/internal/providers/openmeteo"
|
||||
)
|
||||
|
||||
// parseOpenMeteoTime parses Open-Meteo timestamps.
|
||||
//
|
||||
// The actual parsing logic lives in internal/providers/openmeteo so both the
|
||||
// source (envelope EffectiveAt / event ID) and normalizer (canonical payload)
|
||||
// can share identical timestamp behavior.
|
||||
//
|
||||
// We keep this thin wrapper to avoid churn in the normalizer package.
|
||||
func parseOpenMeteoTime(s string, tz string, utcOffsetSeconds int) (time.Time, error) {
|
||||
return openmeteo.ParseTime(s, tz, utcOffsetSeconds)
|
||||
}
|
||||
Reference in New Issue
Block a user