Content-Length: 316849 | pFad | http://github.com/RustPython/RustPython/pull/5523/commits/1bfcb235ba4be378c102b11f95f4afbd47aa44ed

85 Extend time compat for windows by arihant2math · Pull Request #5523 · RustPython/RustPython · GitHub
Skip to content

Extend time compat for windows #5523

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

Merged
merged 6 commits into from
Feb 18, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
function to retrieve tz info on windows
Signed-off-by: Ashwin Naren <arihant2math@gmail.com>
  • Loading branch information
arihant2math committed Feb 18, 2025
commit 1bfcb235ba4be378c102b11f95f4afbd47aa44ed
1 change: 1 addition & 0 deletions vm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ features = [
"Win32_Foundation",
"Win32_System_LibraryLoader",
"Win32_System_Threading",
"Win32_System_Time",
"Win32_UI_Shell",
]

Expand Down
11 changes: 11 additions & 0 deletions vm/src/stdlib/time.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,17 @@ mod decl {
Ok(get_perf_time(vm)?.as_nanos())
}

#[cfg(target_env = "msvc")]
#[cfg(not(target_arch = "wasm32"))]
fn get_tz_info() -> Time::TIME_ZONE_INFORMATION {
let mut info = Time::TIME_ZONE_INFORMATION::default();
let info_ptr = &mut info as *mut Time::TIME_ZONE_INFORMATION;
let _ = unsafe {
Time::GetTimeZoneInformation(info_ptr)
};
info
}

// #[pyfunction]
// fn tzset() {
// unsafe { super::_tzset() };
Expand Down








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/RustPython/RustPython/pull/5523/commits/1bfcb235ba4be378c102b11f95f4afbd47aa44ed

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy