Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

datetime.now() is UTC in Docker despite config #19082

Closed
gnometsunami opened this issue Dec 7, 2018 · 5 comments · Fixed by #26526
Closed

datetime.now() is UTC in Docker despite config #19082

gnometsunami opened this issue Dec 7, 2018 · 5 comments · Fixed by #26526

Comments

@gnometsunami
Copy link

Home Assistant release with the issue:
0.83.3

Operating environment (Hass.io/Docker/Windows/etc.):
Docker

Component/platform:
Climate/Radiotherm

Description of problem:
The radiotherm module ignore timezone configuration when setting the thermostat clock.

IE: If timezone is America/Los_Angeles but the system clock is UTC, radiotherm will set the thermostat clock to UTC.

Looks like an easy fix:

def set_time(self):
	now = datetime.datetime.now()
....
def set_time(self):
	now = dt_util.as_local(dt_util.now())
....
@balloobbot
Copy link

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.

Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍

@Lewenhaupt
Copy link

Is this still an issue you are experiencing? Can you please try upgrading to the latest version of Home Assistant (0.90) and report back if this is still a problem? Thanks!

@robmarkcole
Copy link
Contributor

robmarkcole commented May 15, 2019

This is an issue which affects all components using datetime.now() in Docker, and I am experiencing it with uk_transport component also. Times are correct on Mac OS/Raspbian/Ubuntu, but not in Docker.

INFO: I have set TZ correctly on the Docker container and have configured by time_zone in HA config. @ezdan I assume you checked these also?

@robmarkcole robmarkcole changed the title Radiotherm uses wrong timezone datetime.now() incorrect in Docker May 15, 2019
@robmarkcole robmarkcole self-assigned this May 15, 2019
@robmarkcole robmarkcole changed the title datetime.now() incorrect in Docker datetime.now() is UTC in Docker despite config May 15, 2019
@robmarkcole robmarkcole removed their assignment May 15, 2019
@stale
Copy link

stale bot commented Aug 13, 2019

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍
This issue now has been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Aug 13, 2019
@stale stale bot closed this as completed Aug 20, 2019
@compynei
Copy link

This is still an issue

tsvi added a commit to tsvi/home-assistant that referenced this issue Sep 8, 2019
We want to use our own dt_util.now() which takes into consideration the globally set DEFAULT_TIME_ZONE
@tsvi tsvi mentioned this issue Sep 8, 2019
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants