{"id":2126,"date":"2024-12-02T11:03:49","date_gmt":"2024-12-02T03:03:49","guid":{"rendered":"https:\/\/www.yusian.com\/blog\/?p=2126"},"modified":"2024-12-02T11:03:49","modified_gmt":"2024-12-02T03:03:49","slug":"how-to-change-timezone-in-a-running-docker-container","status":"publish","type":"post","link":"https:\/\/www.yusian.com\/blog\/article\/2024\/12\/02\/1103492126.html","title":{"rendered":"How to change timezone in a running Docker Container"},"content":{"rendered":"<ul>\n<li>The timezone info folder is <code>\/usr\/share\/zoneinfo<\/code><\/li>\n<li>The current timezone info file is <code>\/etc\/localtime<\/code><\/li>\n<li>The current zoneinfo is a link file point to a special timezone file in the timezone info filder. So, we can change the link file point to another timezone like following example<\/li>\n<\/ul>\n<pre><code class=\"language-bash line-numbers\">ln -s \/usr\/share\/zoneinfo\/Asia\/Hong_Kong \/etc\/localtime\n<\/code><\/pre>\n<ul>\n<li>Done<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>The timezone info folder is \/usr\/share\/zoneinfo The current timezone info file is \/etc\/localtime The current zoneinfo is a link file point to a special timezone file in the timezone info filder. So, we can change the link file point to another timezone like following example ln -s \/usr\/share\/zoneinfo\/Asia\/Hong_Kong \/etc\/localtime Done<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[386,1],"tags":[346,8,450],"class_list":["post-2126","post","type-post","status-publish","format-standard","hentry","category-ubuntu","category-article","tag-docker","tag-linux","tag-timezone"],"_links":{"self":[{"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/posts\/2126","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/comments?post=2126"}],"version-history":[{"count":0,"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/posts\/2126\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/media?parent=2126"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/categories?post=2126"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/tags?post=2126"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}