Time runs out for Linux in 2038, what then?What command runs when I SSH into a server?What files get edited when the system time changes?What is the package and background process for “network time”?Date and time panel is greyed out, how do I restore it?What does Ubuntu use for getting/setting the time?Script not executing under CRON every time ie runs for a bit then stops - 16.04Change Ubuntu time and date for specific application

What are the advantages of taking "Sculptor of Flesh" eldritch invocation over taking Polymorph as a spell?

Decode the Dreaded Alphabet Cypher™️

What is the point of teaching Coding and robotics to kids as young as 6 years old?

What was this pickled vegetable which I was served at a middle eastern restaurant (description inside)?

How does a Mandalorian eat food if he never takes his helmet off?

How to resolve the transporter conundrum in a FTL spaceship?

Override iPhone's automatic brightness adjust?

How does Remove Curse affect Bestow Curse

Local bounding box doesn't work inside a scope

Is there a conflict between YAGNI and SRP?

Is it acceptable to have a fraction in an eigenvector?

Is Communism intrinsically Authoritarian?

Is sometimes "how I shall" = "how shall I"?

Is it acceptable to say that a divergent series that tends to infinity is 'equal to' infinity?

Is it a complete sentence: "Caution murmured: it could be a trick, a lure, a trap."?

What is the exact concept of bearings?

For articles with more than 7 authors, is it compulsory to shorten it or just suggested?

Dice game with rules and three dice

Character Development - Robert Baratheon

Almost all non-negative real numbers have only finitely many multiple lies in a measurable set with finite measure

Can I apply for a passport in the country I'm in so I can travel to my home country?

Confusing Nest function behavior

Star developer didn’t get a promotion because he isn’t a people person, so he has scaled back his contributions. How can I motivate him?

Is there any specific reason why Delta Air Lines doesn't have a callsign that doesn't conflict with the NATO Phonetic Alphabet?



Time runs out for Linux in 2038, what then?


What command runs when I SSH into a server?What files get edited when the system time changes?What is the package and background process for “network time”?Date and time panel is greyed out, how do I restore it?What does Ubuntu use for getting/setting the time?Script not executing under CRON every time ie runs for a bit then stops - 16.04Change Ubuntu time and date for specific application






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty
margin-bottom:0;









0


















Many people know Linux time is stored in Seconds since 1970. This time field explodes around the year 2032 and can no longer be used. I'm considering writing a new app that tracks the time a file was last read in Android 7.1.1 which is using Linux Kernel 3.18.



I haven't done any time (date) related programming / record keeping yet and I'm wondering if there is a new format of 64-bit integers or something I can use now. I would write backwards compatability function to the current 32-bit Seconds field currently used in Ubuntu.



Note this isn't a question about Android which is off-topic. I'll be developing my bash script in Ubuntu using Linux 4.14 or 5.3 which accesses Linux 3.18 used in Android via USB.



I know the time Linux blows up is still 19 years away, but I like to future-proof my stuff without having to change it later or to at least make future code changes easier. As I've been coding for over 30 years chances are good I'll still love doing it 20 years from now.



Some examples from Wikipedia:



  • Windows: 1 January 1601 to 14 September 30,828

  • Unix and POSIX: 1 January 1970 to AD 292,277,026,596

I think the Unix and POSIX format to the year 292 billion will outlive the sun which means we'll move off the earth by then and have a new calendar anyway. Plus odds are good my programs will be obsolete 292 billion years from now.



Where can I find the standard for future Linux Time format? Or at least the short list of proposed standards?










share|improve this question

























  • since you've already linked wikipedia: the 2038 problem has it's own article

    – Nmath
    Sep 21 at 0:59






  • 1





    … with surprisingly good sources: elinux.org/images/6/6e/… and lwn.net/Articles/643234

    – dessert
    Sep 21 at 5:57

















0


















Many people know Linux time is stored in Seconds since 1970. This time field explodes around the year 2032 and can no longer be used. I'm considering writing a new app that tracks the time a file was last read in Android 7.1.1 which is using Linux Kernel 3.18.



I haven't done any time (date) related programming / record keeping yet and I'm wondering if there is a new format of 64-bit integers or something I can use now. I would write backwards compatability function to the current 32-bit Seconds field currently used in Ubuntu.



Note this isn't a question about Android which is off-topic. I'll be developing my bash script in Ubuntu using Linux 4.14 or 5.3 which accesses Linux 3.18 used in Android via USB.



I know the time Linux blows up is still 19 years away, but I like to future-proof my stuff without having to change it later or to at least make future code changes easier. As I've been coding for over 30 years chances are good I'll still love doing it 20 years from now.



Some examples from Wikipedia:



  • Windows: 1 January 1601 to 14 September 30,828

  • Unix and POSIX: 1 January 1970 to AD 292,277,026,596

I think the Unix and POSIX format to the year 292 billion will outlive the sun which means we'll move off the earth by then and have a new calendar anyway. Plus odds are good my programs will be obsolete 292 billion years from now.



Where can I find the standard for future Linux Time format? Or at least the short list of proposed standards?










share|improve this question

























  • since you've already linked wikipedia: the 2038 problem has it's own article

    – Nmath
    Sep 21 at 0:59






  • 1





    … with surprisingly good sources: elinux.org/images/6/6e/… and lwn.net/Articles/643234

    – dessert
    Sep 21 at 5:57













0













0









0








Many people know Linux time is stored in Seconds since 1970. This time field explodes around the year 2032 and can no longer be used. I'm considering writing a new app that tracks the time a file was last read in Android 7.1.1 which is using Linux Kernel 3.18.



I haven't done any time (date) related programming / record keeping yet and I'm wondering if there is a new format of 64-bit integers or something I can use now. I would write backwards compatability function to the current 32-bit Seconds field currently used in Ubuntu.



Note this isn't a question about Android which is off-topic. I'll be developing my bash script in Ubuntu using Linux 4.14 or 5.3 which accesses Linux 3.18 used in Android via USB.



I know the time Linux blows up is still 19 years away, but I like to future-proof my stuff without having to change it later or to at least make future code changes easier. As I've been coding for over 30 years chances are good I'll still love doing it 20 years from now.



Some examples from Wikipedia:



  • Windows: 1 January 1601 to 14 September 30,828

  • Unix and POSIX: 1 January 1970 to AD 292,277,026,596

I think the Unix and POSIX format to the year 292 billion will outlive the sun which means we'll move off the earth by then and have a new calendar anyway. Plus odds are good my programs will be obsolete 292 billion years from now.



Where can I find the standard for future Linux Time format? Or at least the short list of proposed standards?










share|improve this question














Many people know Linux time is stored in Seconds since 1970. This time field explodes around the year 2032 and can no longer be used. I'm considering writing a new app that tracks the time a file was last read in Android 7.1.1 which is using Linux Kernel 3.18.



I haven't done any time (date) related programming / record keeping yet and I'm wondering if there is a new format of 64-bit integers or something I can use now. I would write backwards compatability function to the current 32-bit Seconds field currently used in Ubuntu.



Note this isn't a question about Android which is off-topic. I'll be developing my bash script in Ubuntu using Linux 4.14 or 5.3 which accesses Linux 3.18 used in Android via USB.



I know the time Linux blows up is still 19 years away, but I like to future-proof my stuff without having to change it later or to at least make future code changes easier. As I've been coding for over 30 years chances are good I'll still love doing it 20 years from now.



Some examples from Wikipedia:



  • Windows: 1 January 1601 to 14 September 30,828

  • Unix and POSIX: 1 January 1970 to AD 292,277,026,596

I think the Unix and POSIX format to the year 292 billion will outlive the sun which means we'll move off the earth by then and have a new calendar anyway. Plus odds are good my programs will be obsolete 292 billion years from now.



Where can I find the standard for future Linux Time format? Or at least the short list of proposed standards?







bash date






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Sep 21 at 0:32









WinEunuuchs2UnixWinEunuuchs2Unix

66k18 gold badges125 silver badges243 bronze badges




66k18 gold badges125 silver badges243 bronze badges















  • since you've already linked wikipedia: the 2038 problem has it's own article

    – Nmath
    Sep 21 at 0:59






  • 1





    … with surprisingly good sources: elinux.org/images/6/6e/… and lwn.net/Articles/643234

    – dessert
    Sep 21 at 5:57

















  • since you've already linked wikipedia: the 2038 problem has it's own article

    – Nmath
    Sep 21 at 0:59






  • 1





    … with surprisingly good sources: elinux.org/images/6/6e/… and lwn.net/Articles/643234

    – dessert
    Sep 21 at 5:57
















since you've already linked wikipedia: the 2038 problem has it's own article

– Nmath
Sep 21 at 0:59





since you've already linked wikipedia: the 2038 problem has it's own article

– Nmath
Sep 21 at 0:59




1




1





… with surprisingly good sources: elinux.org/images/6/6e/… and lwn.net/Articles/643234

– dessert
Sep 21 at 5:57





… with surprisingly good sources: elinux.org/images/6/6e/… and lwn.net/Articles/643234

– dessert
Sep 21 at 5:57










1 Answer
1






active

oldest

votes


















3



















Where can I find the standard for future Linux Time format?



$ cat xx.c
#include <stdio.h>
#include <time.h>
#include <sys/stat.h>

void
main(void)
auto time_t t;
auto struct stat s;
printf("%d %dn", (int)sizeof(t), (int)sizeof(s.st_mtime));


$ cc xx.c && ./a.out
8 8


Type (time_t) is already 8 bytes, corresponding to what you list as the "Unix and POSIX" standard.



What makes you think Linux needs to define a new standard?






share|improve this answer

























  • What exactly are the upper and lower boundaries of an 8-byte type_t – it’s signed I suppose? Is this a 32 or 64 bit OS where you tried this? Isn’t it (still?) different for 32 bit? What about 32 bit binaries, ioctl() calls and inode timestamps? Filesystems like ext3 and even ext4 use a 32-bit type_t.

    – dessert
    Sep 21 at 5:55











  • @dessert, yes there are very many existing systems where timestamps are stored in only 32 bits, and yes they are going to break in 2038 if they aren't changed. Even worse, many of them are permanently embedded systems that can't be changed. But the question wasn't about that, it was about finding a new standard.

    – Ray Butterworth
    Sep 21 at 11:54













Your Answer








StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "89"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);














draft saved

draft discarded
















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1175595%2ftime-runs-out-for-linux-in-2038-what-then%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown


























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









3



















Where can I find the standard for future Linux Time format?



$ cat xx.c
#include <stdio.h>
#include <time.h>
#include <sys/stat.h>

void
main(void)
auto time_t t;
auto struct stat s;
printf("%d %dn", (int)sizeof(t), (int)sizeof(s.st_mtime));


$ cc xx.c && ./a.out
8 8


Type (time_t) is already 8 bytes, corresponding to what you list as the "Unix and POSIX" standard.



What makes you think Linux needs to define a new standard?






share|improve this answer

























  • What exactly are the upper and lower boundaries of an 8-byte type_t – it’s signed I suppose? Is this a 32 or 64 bit OS where you tried this? Isn’t it (still?) different for 32 bit? What about 32 bit binaries, ioctl() calls and inode timestamps? Filesystems like ext3 and even ext4 use a 32-bit type_t.

    – dessert
    Sep 21 at 5:55











  • @dessert, yes there are very many existing systems where timestamps are stored in only 32 bits, and yes they are going to break in 2038 if they aren't changed. Even worse, many of them are permanently embedded systems that can't be changed. But the question wasn't about that, it was about finding a new standard.

    – Ray Butterworth
    Sep 21 at 11:54
















3



















Where can I find the standard for future Linux Time format?



$ cat xx.c
#include <stdio.h>
#include <time.h>
#include <sys/stat.h>

void
main(void)
auto time_t t;
auto struct stat s;
printf("%d %dn", (int)sizeof(t), (int)sizeof(s.st_mtime));


$ cc xx.c && ./a.out
8 8


Type (time_t) is already 8 bytes, corresponding to what you list as the "Unix and POSIX" standard.



What makes you think Linux needs to define a new standard?






share|improve this answer

























  • What exactly are the upper and lower boundaries of an 8-byte type_t – it’s signed I suppose? Is this a 32 or 64 bit OS where you tried this? Isn’t it (still?) different for 32 bit? What about 32 bit binaries, ioctl() calls and inode timestamps? Filesystems like ext3 and even ext4 use a 32-bit type_t.

    – dessert
    Sep 21 at 5:55











  • @dessert, yes there are very many existing systems where timestamps are stored in only 32 bits, and yes they are going to break in 2038 if they aren't changed. Even worse, many of them are permanently embedded systems that can't be changed. But the question wasn't about that, it was about finding a new standard.

    – Ray Butterworth
    Sep 21 at 11:54














3















3











3









Where can I find the standard for future Linux Time format?



$ cat xx.c
#include <stdio.h>
#include <time.h>
#include <sys/stat.h>

void
main(void)
auto time_t t;
auto struct stat s;
printf("%d %dn", (int)sizeof(t), (int)sizeof(s.st_mtime));


$ cc xx.c && ./a.out
8 8


Type (time_t) is already 8 bytes, corresponding to what you list as the "Unix and POSIX" standard.



What makes you think Linux needs to define a new standard?






share|improve this answer














Where can I find the standard for future Linux Time format?



$ cat xx.c
#include <stdio.h>
#include <time.h>
#include <sys/stat.h>

void
main(void)
auto time_t t;
auto struct stat s;
printf("%d %dn", (int)sizeof(t), (int)sizeof(s.st_mtime));


$ cc xx.c && ./a.out
8 8


Type (time_t) is already 8 bytes, corresponding to what you list as the "Unix and POSIX" standard.



What makes you think Linux needs to define a new standard?







share|improve this answer













share|improve this answer




share|improve this answer










answered Sep 21 at 3:35









Ray ButterworthRay Butterworth

8591 gold badge2 silver badges17 bronze badges




8591 gold badge2 silver badges17 bronze badges















  • What exactly are the upper and lower boundaries of an 8-byte type_t – it’s signed I suppose? Is this a 32 or 64 bit OS where you tried this? Isn’t it (still?) different for 32 bit? What about 32 bit binaries, ioctl() calls and inode timestamps? Filesystems like ext3 and even ext4 use a 32-bit type_t.

    – dessert
    Sep 21 at 5:55











  • @dessert, yes there are very many existing systems where timestamps are stored in only 32 bits, and yes they are going to break in 2038 if they aren't changed. Even worse, many of them are permanently embedded systems that can't be changed. But the question wasn't about that, it was about finding a new standard.

    – Ray Butterworth
    Sep 21 at 11:54


















  • What exactly are the upper and lower boundaries of an 8-byte type_t – it’s signed I suppose? Is this a 32 or 64 bit OS where you tried this? Isn’t it (still?) different for 32 bit? What about 32 bit binaries, ioctl() calls and inode timestamps? Filesystems like ext3 and even ext4 use a 32-bit type_t.

    – dessert
    Sep 21 at 5:55











  • @dessert, yes there are very many existing systems where timestamps are stored in only 32 bits, and yes they are going to break in 2038 if they aren't changed. Even worse, many of them are permanently embedded systems that can't be changed. But the question wasn't about that, it was about finding a new standard.

    – Ray Butterworth
    Sep 21 at 11:54

















What exactly are the upper and lower boundaries of an 8-byte type_t – it’s signed I suppose? Is this a 32 or 64 bit OS where you tried this? Isn’t it (still?) different for 32 bit? What about 32 bit binaries, ioctl() calls and inode timestamps? Filesystems like ext3 and even ext4 use a 32-bit type_t.

– dessert
Sep 21 at 5:55





What exactly are the upper and lower boundaries of an 8-byte type_t – it’s signed I suppose? Is this a 32 or 64 bit OS where you tried this? Isn’t it (still?) different for 32 bit? What about 32 bit binaries, ioctl() calls and inode timestamps? Filesystems like ext3 and even ext4 use a 32-bit type_t.

– dessert
Sep 21 at 5:55













@dessert, yes there are very many existing systems where timestamps are stored in only 32 bits, and yes they are going to break in 2038 if they aren't changed. Even worse, many of them are permanently embedded systems that can't be changed. But the question wasn't about that, it was about finding a new standard.

– Ray Butterworth
Sep 21 at 11:54






@dessert, yes there are very many existing systems where timestamps are stored in only 32 bits, and yes they are going to break in 2038 if they aren't changed. Even worse, many of them are permanently embedded systems that can't be changed. But the question wasn't about that, it was about finding a new standard.

– Ray Butterworth
Sep 21 at 11:54



















draft saved

draft discarded















































Thanks for contributing an answer to Ask Ubuntu!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1175595%2ftime-runs-out-for-linux-in-2038-what-then%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown









Popular posts from this blog

Tamil (spriik) Luke uk diar | Nawigatjuun

Align equal signs while including text over equalitiesAMS align: left aligned text/math plus multicolumn alignmentMultiple alignmentsAligning equations in multiple placesNumbering and aligning an equation with multiple columnsHow to align one equation with another multline equationUsing \ in environments inside the begintabularxNumber equations and preserving alignment of equal signsHow can I align equations to the left and to the right?Double equation alignment problem within align enviromentAligned within align: Why are they right-aligned?

Training a classifier when some of the features are unknownWhy does Gradient Boosting regression predict negative values when there are no negative y-values in my training set?How to improve an existing (trained) classifier?What is effect when I set up some self defined predisctor variables?Why Matlab neural network classification returns decimal values on prediction dataset?Fitting and transforming text data in training, testing, and validation setsHow to quantify the performance of the classifier (multi-class SVM) using the test data?How do I control for some patients providing multiple samples in my training data?Training and Test setTraining a convolutional neural network for image denoising in MatlabShouldn't an autoencoder with #(neurons in hidden layer) = #(neurons in input layer) be “perfect”?