Skip to content

Conversation

@Chris00
Copy link
Member

@Chris00 Chris00 commented Feb 17, 2017

No description provided.

@nojb
Copy link
Contributor

nojb commented Feb 17, 2017

Have you tried this one on Windows ? As far as I remember there is no timegm on Windows.

@dra27
Copy link
Member

dra27 commented Feb 17, 2017

@nojb - you are correct, timegm and timelocal are both GNU/BSD extensions and are not present in any version of the Windows CRT

@Chris00 - timelocal is equivalent to mktime - the GNU docs seem to suggest its use should be rare - what's the argument here?

@xavierleroy
Copy link
Contributor

xavierleroy commented Feb 17, 2017

Quoting the Linux man page:

"These functions are nonstandard GNU extensions that are also present on the BSDs. Avoid their use; see NOTES.

NOTES

The timelocal() function is equivalent to the POSIX standard function mktime(3). There is no reason to ever use it.

For a portable version of timegm(), set the TZ environment variable to UTC, call mktime(3) and restore the value of TZ. "

@Chris00
Copy link
Member Author

Chris00 commented Feb 17, 2017

I should have read more carefully the man page indeed. Would you mind that I add some documentation to the Unix module so that one does not have to look somewhere else?

@Chris00 Chris00 closed this Feb 17, 2017
stedolan pushed a commit to stedolan/ocaml that referenced this pull request Mar 21, 2023
EmileTrotignon pushed a commit to EmileTrotignon/ocaml that referenced this pull request Jan 12, 2024
EmileTrotignon pushed a commit to EmileTrotignon/ocaml that referenced this pull request Jan 12, 2024
* Revert "use asset url to cache-bust (ocaml#1048)"
This reverts commit 6938897.

* Revert "font -> path (ocaml#1047)"
This reverts commit 4fd3d21.

* Revert "apply April 1 changes (ocaml#1046)"
This reverts commit e1cd6fd.
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.

4 participants