-
Notifications
You must be signed in to change notification settings - Fork 317
avoid repeated tzset() calls #2363
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
Conversation
4905963 to
886f81a
Compare
michalvasko
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, just add the docs please.
|
Just remove that explicit call to |
886f81a to
9d10e33
Compare
|
From my man page: Also, the tests started to fail. |
Unfortunately, this doesn't work. 25: [ RUN ] test_data_xml
25: [ ERROR ] --- "2005-05-25T23:15:15.88888+00:00" != "2005-05-25T21:15:15.88888-02:00"
25: 1 FAILED TEST(S)
1/1 Test #25: utest_yang_types .................***Failed 0.04 sec |
Oops, my bad. |
|
Yes, in the attached link as well Unlike localtime(), the reentrant version is not required to set tzname
If the reentrant version does not set tzname, it shall not set daylight and shall not set timezone. |
The tzset() function initializes the tzname variable from the TZ environment variable. There doesn't seem to be any valid usecase of calling this repeatedly. It is an overhead that can be avoided.
9d10e33 to
ee9cc22
Compare
michalvasko
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 for the function name.
The
tzset()function initializes the tzname variable from theTZ environment variable.
There doesn't seem to be any valid usecase of calling this repeatedly.
It is an overhead that can be avoided.