Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support time zone settings for Windows #1204

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Conversation

CID8705
Copy link

@CID8705 CID8705 commented Jun 18, 2023

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
Copy link
Collaborator

ariasuni commented Aug 3, 2023

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
Copy link
Author

CID8705 commented Aug 4, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants