Timezone incorrect

I use a docker install of diyHue in Raspbian with deConz, connected to the bridge with the Hue Essentials app. I thought the schedules weren’t working, but apparently they start exactly one hour too late. For example: I set my schedule to turn on the kitchen lights at 20.00h, but they turn on at 21.00h. I believe the same problem exists for sunrise/sunset schedules, they are 1 hour too late.

In Hue Essentials I have set my timezone to “Europe/Amsterdam” (I live in the Netherlands) and also my home location was set.

Is there a problem with my particular timezone in diyHue, maybe because of summer/winter time? Isthere’s a way to check the actual time the diyHue is working with?

I think we need docker env variable for timezone. Can you try TZ=Europe/Amsterdam ?

Thanks for your reply.

I found a way to check the time in docker and Raspbian, it seems you are right. Raspbian is at the correct timezone (CET), but docker is at a different timezone (UTC) with 1 hour difference:

pi@raspberrypi:~ date Wed 11 Mar 2020 04:52:19 PM CET pi@raspberrypi:~ docker exec -it diyHue bash
root@raspberrypi:/opt/hue-emulator# date
Wed Mar 11 15:53:55 UTC 2020

I don’t know much about docker and have only basic knowledge about Linux, so I rely on information I find online. I found this old topic online about adding TZ info when starting docker, is this the correct way to do this for diyHue?:

docker run -e TZ=Europe/Amsterdam diyHue date

I really don’t want to mess this up by trial and error, it already cost me way too much time to get it running properly :wink:

You can set the timezone in your config. JSON file, can’t you? Isn’t that the timezone that is used by DIYHue? Or does it just use the system clock?

Correct! You can set the Timezone for diyHue in the config.json file, located in the main installation directory.

Thanks for the replies. I have a docker install, so I have to edit config.json in /mnt/hue-emulator/export right?

I have stopped diyHue (docker stop diyHue), copied that config.json file and checked the following 2 lines (the first line said “UTC”, the second line was already set correct by Hue Essentials):

“config”: {
“Hue Essentials key”: “xxxxxxxxxxxx”,
“Remote API enabled”: true,
"Europe/Amsterdam": “2020-03-12T16:24:57”,
“apiversion”: “1.35.0”,
“backup”: {
“errorcode”: 0,
“status”: “idle”
“bridgeid”: “xxxxxxxxxxxxxxxxxxx”,
“datastoreversion”: “70”,
“dhcp”: true,
“factorynew”: false,
“gateway”: “”,
“internetservices”: {
“internet”: “connected”,
“remoteaccess”: “connected”,
“swupdate”: “connected”,
“time”: “connected”
“ipaddress”: “”,
“linkbutton”: false,
“localtime”: “2020-03-12T16:24:57”,
“mac”: “b8:27:eb:d1:22:00”,
“modelid”: “BSB002”,
“name”: “diyHue”,
“netmask”: “”,
“portalconnection”: “connected”,
“portalservices”: true,
“portalstate”: {
“communication”: “disconnected”,
“incoming”: false,
“outgoing”: true,
“signedon”: true
“proxyaddress”: “none”,
“proxyport”: 0,
“replacesbridgeid”: null,
“starterkitid”: “”,
“swupdate”: {
“checkforupdate”: false,
“devicetypes”: {
“bridge”: false,
“lights”: [],
“sensors”: []
“notify”: true,
“text”: “”,
“updatestate”: 0,
“url”: “”
“swupdate2”: {
“autoinstall”: {
“on”: true
“swversion”: “1935144020”,
"timezone": “Europe/Amsterdam”,
“touchlink”: true,
“whitelist”: {

After that I copied the file back to /mnt/hue-emulator/export and started diyHue again (docker start diyHue). I added a schedule for turning some lights off in 2 minutes, but it didn’t work. I changed the schedule with 1 hour difference and it does work, same as before.
Changing those 2 lines in config.json didn’t do anything as far as I can tell and neither does changing the timezone in Hue Essentials.

Is there another line I should change, or is changing the timezone for docker the solution? If so, is this the correct way?:

docker run -e TZ=Europe/Amsterdam diyHue date

That doesn’t work either:

pi@raspberrypi:~ $ docker run -e TZ=Europe/Amsterdam diyHue
docker: invalid reference format: repository name must be lowercase.
See ‘docker run --help’.