ct-Open-Source / ct-Smart-Home

A ready-to-use Node-RED setup for home automation
https://ct.de/smarthome
GNU General Public License v2.0
166 stars 40 forks source link

Inject nodes trigger at UTC time instead of local time #15

Closed renne closed 4 years ago

renne commented 5 years ago

Hi,

inject nodes trigger at UTC time instead of local time. System is Debian 9 Stretch in a KVM virtual machine. Debian timezone and date output are correct:

renne@Homematic:~$ cat /etc/timezone
Europe/Berlin
renne@Homematic:~$ date
Mo 1. Jul 20:55:49 CEST 2019

What' going wrong here?

renne commented 5 years ago

Adding process.env.TZ = "Europe/Berlin"; to settings.js solved the problem. I suggest to copy the value from /etc/timezone on the host to settings.js in the docker container when running the setup script.

KarstenDE commented 5 years ago

I found that a docker mapping should help: docker run -v /etc/localtime:/etc/localtime

Can this be integrated easily?

merlinschumacher commented 4 years ago

The problem is, that the /etc/localtime solution isn't reliable. The file isn't always present. But i will try to find a solution.

merlinschumacher commented 4 years ago

Fixed in 1.2