APLawrence.com -  Resources for Unix and Linux Systems, Bloggers and the self-employed

2003/09/23 epoch

© September 2003 Tony Lawrence

The beginning of time, at least as far as your computer's internal clock knows.

Time is measured in seconds since the epoch. For Unix systems (and I think Windows also) that's January 1st, 1970, 00:00:00 GMT.

Because time, like any computer value, is stored in a finite space, the apocalypse comes for 32 bit Unix on Janary 18th, 2038. That's when 32 bits overflows, and magically it will be January 1970 once again.

By then, of course, 64 bit systems will be in place, and Linux will have made Windows something we'll tell our disbelieving grandchildren about.

I'll be a month short of 90 years old when that day comes, and expect to be still babbling about Unix and Linux systems, though I hope Microsoft operating systems are gone by then.

The reason time is stored as offset seconds rather than a more complex, less limited format (like what we humans use: Sun Sep 21 12:18:48 GMT 2003), is that seconds are easier for programs to deal with. If you have today's date in seconds since the epoch, calculating tomorrow is simply a matter of adding (24 * 60 * 60 ).

Seconds since the epoch is exactly what is returned by the time() system call and the Perl function of the same name.

Got something to add? Send me email.

(OLDER)    <- More Stuff -> (NEWER)    (NEWEST)   

Printer Friendly Version

-> epoch

Inexpensive and informative Apple related e-books:

El Capitan: A Take Control Crash Course

Take Control of iCloud, Fifth Edition

Take Control of Apple Mail, Third Edition

Take Control of iCloud

Take Control of Upgrading to El Capitan

More Articles by © Tony Lawrence

Printer Friendly Version

Have you tried Searching this site?

This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more.

Contact us

Printer Friendly Version

What worries me about religion is that it teaches people to be satisfied with not understanding. (Richard Dawkins)

Linux posts

Troubleshooting posts

This post tagged:



Unix/Linux Consultants

Skills Tests

Unix/Linux Book Reviews

My Unix/Linux Troubleshooting Book

This site runs on Linode