y2038 | Fix time.h on 32 bit machines to work past the year 2038 bug | Command Line Interface library
kandi X-RAY | y2038 Summary
kandi X-RAY | y2038 Summary
This is an implementation of POSIX time.h which solves the year 2038 bug on systems where time_t is only 32 bits. It is implemented in bog-standard ANSI C. The latest version can be found at It makes use of the system's native 32 bit functions to perform time zone and daylight savings time calculations and thus does not need to ship its own time zone table. Here is a list of the currently implemented functions in time64.h and their POSIX time.h equivalents. localtime64_r localtime_r localtime64 localtime gmtime64_r gmtime_r gmtime64 gmtime asctime64_r asctime_r asctime64 asctime ctime64_r ctime_r ctime64 ctime timelocal64 mktime mktime64 mktime timegm64 timegm (a GNU extension). To install, simply copy time64.c and time64.h into your project and make use of the functions. To test, run "make test". You must have Perl, prove (which comes with a recent version of the Test::Harness Perl module) and bzdiff installed to run the full test suite. It will do a number of unit tests, plus test against a large table of known good values in different time zones.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of y2038
y2038 Key Features
y2038 Examples and Code Snippets
Community Discussions
Trending Discussions on y2038
QUESTION
On PHP 7.2.14 64-bit, on Windows, touch()
cannot set a file's date to a date after 2038. filemtime()
will read such a file's date fine (date was set with an external tool).
Is this expected behavior?
Is it possible to write code that changes a file's date in a Y2038 friendly way?
Issue doesn't seem to be in PHP Bug Tracking : Search for "2038"
Code sample:
...ANSWER
Answered 2019-Jun-21 at 18:42It's seems that you run into Year 2038 problem, see here: https://en.wikipedia.org/wiki/Year_2038_problem You cannot encode times after 03:14:07 UTC on 19 of January 2038, so you fall back to 13th of December 1901
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install y2038
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page