Skip to content

question: failed to find timezone 'Asia/Shanghai' in time zone database #160

Answered by BurntSushi
TCeason asked this question in Q&A
Discussion options

You must be logged in to vote

As a practical matter, if you enable logging, Jiff is should emit very detailed log messages about what's going wrong when it comes to system integration stuff. That probably would have saved you some head-scratching.

Is it by design? Why we need it?

As a conceptual matter, think about it: every time zone has its own rules for transitions. How does your code know what they are?

On Unix systems, the standard way to do this is with tzdb at /usr/share/zoneinfo. In your case, installing it into your Docker image should fix your problem. This is the preferred approach.

chrono-tz doesn't need this because it bundles all of the data into your Rust program. Jiff supports this too, and you can e…

Replies: 4 comments 7 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
7 replies
@LinusU
Comment options

@BurntSushi
Comment options

@LinusU
Comment options

@BurntSushi
Comment options

@BurntSushi
Comment options

Answer selected by BurntSushi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #159 on November 08, 2024 12:59.