Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
This commit is contained in:
Valentin Rothberg
2023-03-29 14:00:05 +02:00
parent 411693c769
commit f0cfbbe2cc
41 changed files with 760 additions and 410 deletions

View File

@ -57,7 +57,7 @@ func (d *Date) UnmarshalText(text []byte) error {
if len(text) == 0 {
return nil
}
dd, err := time.Parse(RFC3339FullDate, string(text))
dd, err := time.ParseInLocation(RFC3339FullDate, string(text), DefaultTimeLocation)
if err != nil {
return err
}
@ -107,7 +107,7 @@ func (d *Date) UnmarshalJSON(data []byte) error {
if err := json.Unmarshal(data, &strdate); err != nil {
return err
}
tt, err := time.Parse(RFC3339FullDate, strdate)
tt, err := time.ParseInLocation(RFC3339FullDate, strdate, DefaultTimeLocation)
if err != nil {
return err
}
@ -126,7 +126,7 @@ func (d *Date) UnmarshalBSON(data []byte) error {
}
if data, ok := m["data"].(string); ok {
rd, err := time.Parse(RFC3339FullDate, data)
rd, err := time.ParseInLocation(RFC3339FullDate, data, DefaultTimeLocation)
if err != nil {
return err
}