Skip to content

[libc] Implement 64bit time_t and localtime #125196

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

Open
zimirza opened this issue Jan 31, 2025 · 1 comment
Open

[libc] Implement 64bit time_t and localtime #125196

zimirza opened this issue Jan 31, 2025 · 1 comment
Labels

Comments

@zimirza
Copy link
Contributor

zimirza commented Jan 31, 2025

It might be good to implement a 64bit time_t and localtime/localtime_s. According to https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/localtime-localtime32-localtime64, these are defined as:

struct tm *localtime( const time_t *sourceTime );
struct tm *_localtime32( const __time32_t *sourceTime );
struct tm *_localtime64( const __time64_t *sourceTime );

It would be good to be consistent for compatibility reasons.

This should be implemented after #110363 gets merged and #107597 is completed.

@llvmbot llvmbot added the libc label Jan 31, 2025
@llvmbot
Copy link
Member

llvmbot commented Jan 31, 2025

@llvm/issue-subscribers-libc

Author: Зишан Мирза (zimirza)

It might be good to implement a 64bit `time_t` and `localtime`/`localtime_s`. According to https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/localtime-localtime32-localtime64, these are defined as:
struct tm *localtime( const time_t *sourceTime );
struct tm *_localtime32( const __time32_t *sourceTime );
struct tm *_localtime64( const __time64_t *sourceTime );

It would be good to be consistent for compatibility reasons.

This should be implemented after #110363 gets merged and #107597 is completed.

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

No branches or pull requests

2 participants