Incorrect Reported Time / Dark Sky

Hi All,

I’m seeing something strange with the Darksky sensor and an IOS device. If I use my laptop (WIn 10) and look at the forecast from Dark Sky, I have no problems. But, if I use the IOS App, or use the firefox web-browser to access Home Assistant, the time reported for the forecast in Dark Sky is incorrect. The image attached shows (in red) what my IOS device reports for time, I took the screenshot from my Win 10 machine and marked it up.

Did I configure something wrong somewhere?

2018-10-07_23h35_27

time zone settings on iPhone or computer are not set correctly most likely

edit: Add my iphone timezone setting

I went into the container and did a cat /etc/timezone => Etc/UTC. So i changed the container and added a binding to /etc/timezone & /etc/localtime. Still reports the wrong times to my ios device.

My Windows PC is in EDT <- this one still has the correct times reported
My Ubuntu server (hosting the container) is in EDT
My iphone timezone = Detroit
& now my home-assistant container is in EDT (after adding the above binding)

configuration.yaml:
time_zone: America/Detroit

what time settings do you have on your iPhone?

Sorry, forgot to include that bit of information. I edited my previous post for clarity.

Hmm. Do you have the Timezone set in configuration yaml?

homeassistant:
  name: Home
  latitude: !secret my_latitude
  longitude: !secret my_longitude
  elevation: !secret my_elevation
  unit_system: metric
  time_zone: !secret my_timezone

Really the only reason for the behaviour you describe is a time zone mismatch somewhere. HA always works in UTC and uses the time_zone above to adjust.

Oh crap… I see you have that set…
Out of ideas here. Sorry.

I have this problem as well. Any solutions?

I have the same problem as well. I’m on Hassio 0.80.3 but have noticed it for a while now on previous versions.

Just noticed my times are wrong differently on pc vs iphone. Neither is correct but are different.

I have verified my timezone settings on the server running docker, the docker image running Home Assistant, and my ios device timezone.

I think there is an issue between ios and Haasio with timezones.

I also recently updated to the latest release and still have the issue.

I would like to report the same issue. I’m running Hassbian, have the correct timezone set in the configuration file (and verified, as log entries are correct), but dark sky is showing UTC values.

yup. same here, interestingly the logbook that is also iOS timezone based shows the correct timeszone… some issue with the card I think.

Same here, running Hassio and have the time zone set in config but getting the wrong time in Dark Sky forecast. :frowning:

I have the same problem. I tried various combinations of timezone settings on the OS, docker container and ha configuration without success.
I am wondering if it is an issue with the dark sky component.

I had the same issue from PC until installing the new Chrony add-on

Prematurely posted as on the iPhone the time is still incorrect which is mystifying
let me know on your end

This is still happening in HA 0.99.2 and Frontend 20190919.0 (on RPi 4 release candidate running HassOS 3.5).

I think I know what’s going on. It seems like Dark Sky is returning times relative to the location of the weather (duh), but the Weather component is assuming they’re GMT+0 times, and incorrectly adjusting them. I think.

I set logging to “debug” level and got a lot of info. See the attached screenshot.

In it you can see that at the top, the sunset/sunrise/noon etc. info is coming back as GMT+00:00 time. I think that’s from the weather component. Then, below that, the forecast comes in from the DarkSky platform, and the times are all relative to my time (Mountain Time in the U.S., which is currently GMT/UTC-6). That -6 is critical, as that’s precisely the amount subracted from the DarkSky times and show in the UI. For example, where the Dark Sky forecast says 8pm, the UI renders 2pm, and 9pm forecast becomes 3pm in the UI, etc.

I’m not sure if the fix should be made in the Dark Sky platform, the Weather component, or perhaps even the Lovelace card. Anyone?

I just filed an issue/bug: