Room conditions endpoint returns timestamps incorrectly shifted into Sense's timezone
Closed this issue · 4 comments
decarbonization commented
For the input: {"value":25.1,"datetime":1420627500000,"offset_millis":-28800000}
new DateTime(1420627500000L, DateTimeZone.UTC)
yields 2015-01-07T10:45:00.000Z
it should yield 2015-01-07T02:45:00.000Z
Fixing this bug will require a client update.
pangw commented
No this is not a bug
pangw commented
new DateTime(1420627500000L, DateTimeZone.fromOffset(-28800000))
pangw commented
Should not set the time zone to UTC, or you will get UTC time
pangw commented
You want to display the local time of sense (But dont convert datetime object to local utc)