How to update docker datetime and timezone in Discourse

I found that the date inside docker is different with the host machine. You can check the date by using this way.

[[email protected] discourse]# docker exec app date
Mon 20 Apr 2020 08:38:36 PM UTC
[[email protected] discourse]# date
Tue Apr 21 04:12:39 +08 2020
[[email protected] discourse]#

Solution to update the date

[[email protected] discourse]# cd /var/discourse
[[email protected] discourse]# ./launcher enter app
[[email protected] discourse]# mv /etc/localtime /etc/localtime.backup
[[email protected] discourse]# ln -s /usr/share/zoneinfo/EST5EDT localtime
[[email protected] discourse]# date

Now the date is correct


Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.