Yes, so if you were to take the +1 hour of your time zone and subtract it from local you get utc. If the input time is local, then you need to convert it as a local timestamp, not utc like you’re doing
This is both of you not understand that the conversion is treating the sting as utc. Make it timezone agnostic by removing the Z. Then use as datetime and as local
Yes there’s 3 types of datetimes: local, utc, and none. None has no concept of a what timezone it is, so you can then attach one to it… by using as_local.
Listen, if the time is local and not utc you have to treat it as local. I don’t know how else to explain this to you. If they are attaching Z and your time is wrong, then they are giving you the wrong timestamp. Removing z doing as_datetime | as_local will give you that time as your local time. Do not use as_timestamp. Do not use anything else.
If the time is supposed to be @15 and it’s reporting 16, then they are giving you wrong information. Plan and simple. Your timezone is plus 1. Minus 1 is in the ocean and a minus 1 is the only way local or utc would give you 15.
2022-03-06 16:02:11+00:00 | UTC
2022-03-06 16:02:11 | None
2022-03-06 16:02:11+01:00 | whatever TZ this is
Your time zone is +1 currently (possibly with DST?)
Assuming that you are correct with your claim that it’s off by an hour and it should be 15, then the datetime should be one of the following:
If the time string is meant to be UTC then it should be should be showing 2022-03-06T14:02:11Z.
If the time string is meant to be local, then it should be showing 2022-03-06T15:02:11 with the assumption that you add the time zone.
So, no matter what, the input time string is wrong.
Ive written the developer, and hope to get some response soon.
I guess its safe to assume the assumptions, nowhere else in the system is this an issue, and, these data sets are not HA generated, but generated by the external device.
fwiw, one of the other external devices publishes this:
i’ve also tried to get a grip on this “syndrome”, where does it come from, where/what change it, and what to do, if it won’t play “my tune” … i will read your little “investigation” and petro’s explanation, over, and over again, when needed a “solution”, not that i ever think i will understand the “logic” … i tend to look for “workarounds”, thou i wish that a device (which can report whatever timedateTz, producer like) could be “stripped/converted” to system default at integration/reporting time, but seems like various integrations uses various ways
@finity did you get this timestamp formatting working for 17track?
I am trying to use this format exactly (as you noted earlier in this thread) but my timestamp isn’t changing. Any hints?