title: Docker container time zone remains as UTC
body: <p>I have been working through setting my ms-sql docker container to use the Linux host date time settings. I'm using a docker-compose file, and for the most part the solution appears to be to map volumes like so (references: <a href="https://bobcares.com/blog/change-time-in-docker-container/" rel="nofollow noreferrer">Bobcares</a>, <a href="https://stackoverflow.com/a/67054850/3295404">SO</a> ):</p>
  <pre><code>volume:
    - /etc/timezone:/etc/timezone:ro
    - /etc/localtime:/etc/localtime:ro
  </code></pre>
  <p>At first glance, this looks fine. I can check what date the container thinks it is, and it reflects the host local time zone. The SQL instance, however, is still displaying UTC time for <code>GetDate()</code>.</p>
  <p>There is a symbolic link within the container though, that always looks like this: <code>localtime -&gt; /usr/share/zoneinfo/Etc/UTC</code>. This is not what I am expecting based on the volume mapping, as it is different from the host <code>localtime -&gt; ../usr/share/zoneinfo/Australia/Sydney</code>. I can manually update this link within the container and <code>GetDate()</code> on SQL returns the correct local datetime. All is lost on a <code>docker-compose down</code>, as expected.</p>
  <p>I need this to persist across container restarts, and I want to use the volume from the docker-compose file to handle time zones as we deploy to multiple time zones. I'm sure the problem is my noob linux skillset, so happy for advice on how to improve this. How do I fix the symbolic link problem (if that is indeed the root cause of the problem)?</p>
  <p>Host is: Ubuntu 20.04.1 LTS (Focal Fossa)
  ms-sql image is: mcr.microsoft.com/mssql/server:2019-latest</p>