Created
September 26, 2018 15:01
-
-
Save redraw/169d3238e313d495c7dc021fc971295d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include<stdio.h> | |
| #include<stdint.h> | |
| #include<time.h> | |
| #define Y2038 (int32_t)2147483647 | |
| int32_t ts; | |
| void main() { | |
| ts = (int32_t) time(NULL); | |
| while (Y2038 - ts >= 0) { | |
| ts += 60; | |
| printf("%d\n", ts); | |
| } | |
| printf("******* Y2038! ********"); | |
| printf("\nHit any key to see following overflow integers\n"); | |
| while(1) { | |
| printf("%d", ts++); | |
| getchar(); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment