Keats / tera

A template engine for Rust based on Jinja2/Django
http://keats.github.io/tera/
MIT License
3.5k stars 281 forks source link

Wrong timezone in Mexico produced by outdated chrono-tz crate. #833

Closed rsansores closed 1 year ago

rsansores commented 1 year ago

Hi, I am seeing wrong local timezone when using the "date" function. Tracked down the problem to chrono-tz that is quite outdated.

Changing the version in Cargo.toml solves the problem since the IANA database is updated correctly there.

Current version:

# chrono-tz is pinned to Version 0.6.1 for MSRV 1.56.0
chrono-tz = {version = "=0.6.1", optional = true}

Version with the IANA database updated to 2022f: chrono-tz = "0.8.2"

All tests pass with that version but I see the comment that chrono-tz is explicitly set to 1.56 because of the min rust version. Would be good to be able to use a mainstream Tera version but for now will need to fork.