hello/suripu

Room conditions endpoint returns timestamps incorrectly shifted into Sense's timezone

Closed this issue · 4 comments

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.

No this is not a bug

new DateTime(1420627500000L, DateTimeZone.fromOffset(-28800000))

Should not set the time zone to UTC, or you will get UTC time

You want to display the local time of sense (But dont convert datetime object to local utc)