ogham / exa

A modern replacement for ‘ls’.
https://the.exa.website/
MIT License
23.45k stars 658 forks source link

Support time zone settings for Windows #1204

Open CID8705 opened 1 year ago

CID8705 commented 1 year ago

The time zone setting for Windows was unsupported, so it is now supported. In making this correction, a new crate was added. Also, the difference appears in Cargo.lock, but since Cargo.lock is generated automatically, so I added it to .gitignore. Reference: https://github.com/github/gitignore/blob/main/Rust.gitignore

ariasuni commented 11 months ago

You shouldn’t remove Cargo.lock from the repository, see here for a rationale.

The code seems quite complicated and I’ve honestly no idea what it does, do you think you could simplify and explain it? I don’t think we need to use Arc for timezones in exa for example.

CID8705 commented 11 months ago

I see why Cargo.lock should not be removed. I would like to correct this.

I am just modifying from TimeZoneSource::Static() to TimeZoneSource::Runtime() and setting the appropriate time zone. The basic structure of the source code has not changed much from the original one. the reason for using Arc is to match the type of the original source code. The source code of zoneinfo_compiled was used as a reference.

Reference: https://github.com/rust-datetime/zoneinfo-compiled/blob/master/src/lib.rs#L44