You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have had some bug reports in Hugo after the v2 upgrade because of the new local date/datetime types. I probably should have seen these coming and fixed them sooner, as they are fixable on our side. But after doing some work on this (see gohugoio/hugo#9981) I get a nagging feeling that it would possibly be good to have an option or two re. dates in go-toml's Decoder:
I notice that it's using time.Local when decoding into a time.Time.
When decoding into a map[string]interface{} you currently now always get LocalDateTime/LocalDate.
What would be nice here would be to have Decoder options for
the Location to use (time.Local does not work in settings with multiple time zones etc.)
also an option to get time.Time when the target is map[string]interface{} (which was the behaviour in v1)
The workaround I'm looking at on the Hugo side now, is to walk the map[string]interface{} and do a conversion, but I have a nagging suspicion that this may be a concern from more people out there.
We have had some bug reports in Hugo after the v2 upgrade because of the new local date/datetime types. I probably should have seen these coming and fixed them sooner, as they are fixable on our side. But after doing some work on this (see gohugoio/hugo#9981) I get a nagging feeling that it would possibly be good to have an option or two re. dates in go-toml's
Decoder
:time.Local
when decoding into atime.Time
.map[string]interface{}
you currently now always getLocalDateTime
/LocalDate
.What would be nice here would be to have
Decoder
options forLocation
to use (time.Local
does not work in settings with multiple time zones etc.)time.Time
when the target ismap[string]interface{}
(which was the behaviour in v1)The workaround I'm looking at on the Hugo side now, is to walk the
map[string]interface{}
and do a conversion, but I have a nagging suspicion that this may be a concern from more people out there./cc @jmooring
The text was updated successfully, but these errors were encountered: