it looks like under some conditions (till now not reproduced) time values with go representation time.Date(0, 0, 0, 0, 0, 0, 0, time.UTC) get's returned.
regarding time package documentation, this results in Year -1 which is invalid for json decoding that has a year range from 0-9999.
Current guess is after a firmware update or maybe reboot of E3DC that the EMS_MANUAL_CHARGE_LASTSTART returns a negative year.
So for json marshaling, we need to fix this responses to at least year = 1.
We assume the json output is mostly used in third-party directly, we "fix" the time to.
it looks like under some conditions (till now not reproduced) time values with go representation
time.Date(0, 0, 0, 0, 0, 0, 0, time.UTC)
get's returned. regardingtime
package documentation, this results in Year-1
which is invalid for json decoding that has a year range from 0-9999.json decoding for
time.Time
requires a min of:rscp responses can contain:
experienced once by my self and reported once here: https://github.com/spali/go-rscp/discussions/16#discussioncomment-2699393
Current guess is after a firmware update or maybe reboot of E3DC that the
EMS_MANUAL_CHARGE_LASTSTART
returns a negative year.So for json marshaling, we need to fix this responses to at least year = 1. We assume the json output is mostly used in third-party directly, we "fix" the time to.
This should be better supported in third party than smaller dates and are commonly also seen as "zero" time.