Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[libc] implement template functions for localtime #110363

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
wants to merge 166 commits into
base: main
Choose a base branch
from

Conversation

zimirza
Copy link
Contributor

@zimirza zimirza commented Sep 28, 2024

This is an implementation for template functions of localtime.

Update for this pull request: Implementation as been removed from this pull request and will be added to a new one. This is because this pull request is getting big. This pull request will only contain template functions in order to implement localtime.

Update: The implementation is available in https://github.com/zimirza/llvm-project/tree/localtime_implementation.

Copy link

github-actions bot commented Sep 28, 2024

✅ With the latest revision this PR passed the C/C++ code formatter.

@zimirza
Copy link
Contributor Author

zimirza commented Oct 8, 2024

Instead of using /etc/timezone, it is better to parse /etc/localtime.

@zimirza
Copy link
Contributor Author

zimirza commented Dec 26, 2024

Even though this pull request is not yet finished, I thought it would be great to get a review since this pull request is getting quite big. There are some unit tests that are not working, and have been commented out.

@zimirza zimirza marked this pull request as ready for review December 26, 2024 02:00
@zimirza zimirza force-pushed the localtime_107597 branch 2 times, most recently from eca1d44 to 1456c67 Compare December 26, 2024 06:08
@zimirza zimirza force-pushed the localtime_107597 branch 2 times, most recently from 2f14147 to 6a84f62 Compare January 3, 2025 20:34
@nickdesaulniers nickdesaulniers self-requested a review January 7, 2025 18:52
@nickdesaulniers
Copy link
Member

(currently not finished)

Consider marking this as a "draft" in the github UI.

@petrhosek
Copy link
Member

This is a large change and there are some aspects that will likely require more discussion, like what kind of TZ support we even want and how to do it, whether we could share the implementation with libc++, etc. This could be discussed either on Discourse or at the public LLVM-libc meeting (or both). In the meantime, I think the best path forward would be to split this change into multiple changes, with the first one being just an empty minimal implementation which could be merged while we're discussing the implementation details.

@zimirza
Copy link
Contributor Author

zimirza commented Jan 8, 2025

(currently not finished)

Consider marking this as a "draft" in the github UI.

Sure, I will mark this as a draft.

@zimirza zimirza marked this pull request as draft January 8, 2025 08:09
@zimirza zimirza changed the title [libc] implement localtime [libc] implement template functions for localtime Jan 16, 2025
@zimirza
Copy link
Contributor Author

zimirza commented Apr 30, 2025

I have limited this pull request to template functions for localtime and localtime_r. I was thinking that after this pull request is merged, I can create a new pull request with the actual implementation for timezones and daylight saving time. Please do let me know what you think.

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.

5 participants