-1

https://i.stack.imgur.com/8E8fX.png (this is the link to the screenshot).

I want to use https://github.com/polkascan/polkascan-os.git to launch a block exploer. But As the picture shows, I met the warnning "Unable to load '/usr/share/zoneinfo/****** as time zone". And finally, my block exploer can't shows the time correctly. So I think it has something to do with the warnning. I have searched the warnning, but seems like the solutions are all for docker but not docker-compose. So could anyone tell me how to solve the problem in dock-compose?

peilin
  • 23
  • 5
  • Hi! Welcome to SO! Which solutions did you find? If you [edit] your question to include a link, maybe we could help you figure out how to apply it to your situation. – Julia Mar 05 '21 at 10:56
  • Hello, I added a link now. – peilin Mar 05 '21 at 12:36
  • Please, don't post images when you can post a plain text code block https://meta.stackoverflow.com/questions/285551/why-not-upload-images-of-code-errors-when-asking-a-question – emi Mar 05 '21 at 12:41

1 Answers1

1

Try defining the containers timezone. There are several ways, depending on the contained system. For example, mounting host's /etc/localtime and /etc/timezone into the container:

  explorer-api:
    volumes:
      - "/etc/localtime:/etc/localtime:ro"
      - "/etc/timezone:/etc/timezone:ro"
emi
  • 2,786
  • 1
  • 16
  • 24