localtime_r shim uses TZ variable from the host, not the interpreted program · Issue #3522 · rust-lang/miri (original) (raw)
Navigation Menu
- GitHub Copilot Write better code with AI
- GitHub Models New Manage and compare prompts
- GitHub Advanced Security Find and fix vulnerabilities
- Actions Automate any workflow
- Codespaces Instant dev environments
- Issues Plan and track work
- Code Review Manage code changes
- Discussions Collaborate outside of code
- Code Search Find more, search less
- Explore
- Pricing
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Appearance settings
Description
Currently the test suite may fail to pass, unless you run it with TZ=UTC ./miri test
. This is because the localtime_r
shim reads the TZ
variable from the host on this line:
// Convert that to local time, then return the broken-down time value. |
---|
let dt: DateTime<Local> = DateTime::from(dt_utc); |
In other words, this test code is ineffective:
// Set timezone to GMT. |
---|
let key = "TZ"; |
env::set_var(key, "GMT"); |
I'm going to look into this.
cc @tiif @eduardosm