Guilherme Sehn
Guilherme Sehn

Reputation: 6787

Timezone information (zoneinfo) is out-of-date on Dokku. How to update?

Recently, the Brazilian government abolished the daylight saving time where the timezone offset went from -3 to -2.

My Dokku container still contains the old information, causing my Ruby on Rails application that reads directly from the OS zoneinfo to display times in DST when it shouldn't.

I can check that my host machine has up-to-date timezone information because when I run TZ=":America/Sao_Paulo" date it outputs Fri Nov 8 12:10:xx -03 2019. Running the same command inside my Dokku container outputs Fri Nov 8 13:10:xx -02 2019.

How can I update my Dokku time zone information and make it persistent between deployments?

Upvotes: 2

Views: 399

Answers (1)

Guilherme Sehn
Guilherme Sehn

Reputation: 6787

To solve it, I did the following steps:

  1. run docker system prune -a
  2. run dokku ps:rebuild [app-name]

The first command cleared the Docker image cache for gliderlabs/herokuish:latest which contained the Heroku stack with the out-of-date timezone information. The second command rebuilt the app from source downloading the newer herokuish image.

Upvotes: 1

Related Questions