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
Currently the test suite may fail to pass, unless you run it with
TZ=UTC ./miri test. This is because thelocaltime_rshim reads theTZvariable from the host on this line:miri/src/shims/time.rs
Lines 139 to 140 in f26bd28
In other words, this test code is ineffective:
miri/tests/pass-dep/shims/libc-misc.rs
Lines 220 to 222 in f26bd28
I'm going to look into this.
cc @tiif @eduardosm