title: Docker Container: time/timezone wrong
body: <p>I am in a running docker container with node and for some reason the timezones / the time of the host machine vs inside the docker container never line up:</p>
  
  <pre><code>root@foobar:~# node -e "console.log(new Date())"
  &gt;&gt; Tue May 17 2016 15:12:43 GMT+0200 (CEST)
  root@foobar:~# docker exec 9179105c0ff9 node -e "console.log(new Date())"
  &gt;&gt; Tue May 17 2016 13:13:01 GMT+0000 (Europe)
  root@foobar:~# cat /etc/timezone
  &gt;&gt; Europe/Vienna
  root@foobar:~# docker exec 9179105c0ff9 cat /etc/timezone
  &gt;&gt; Europe/Vienna
  </code></pre>
  
  <p>So what I already did in my docker-start shell is script is the following:</p>
  
  <pre><code>docker run \
  ...
  -v /etc/localtime:/etc/localtime:ro \
  -v /etc/timezone:/etc/timezone:ro \
  -e "TZ=Europe/Vienna" \
  ...
  </code></pre>
  
  <p>... but still, as you can see in the first codeblock, the time is still wrong! Any ideas on this? What am I missing?</p>
  
  <p>(fyi: I am running a meteor app deployed via <a href="https://github.com/arunoda/meteor-up/tree/mupx" rel="nofollow">mupx</a>)</p>
  
  <p><strong>UPDATE:</strong></p>
  
  <p>After running <code>date</code> on the host and inside the container, there again is a difference of 2hrs. so for some reason the docker container just does not "apply" my timezone and <strong>it seems like the problem is not JS/node related, since <code>date</code>is just a simple unix system cmd</strong> ... what am I missing here?!</p>