LWN.net Logo

Why is time_t not unsigned

Why is time_t not unsigned

Posted Sep 13, 2006 16:29 UTC (Wed) by rvfh (subscriber, #31018)
In reply to: Time representation by rvfh
Parent article: What you should (and shouldn't) expect from 64-bit Linux (Linux.com)

I found an answer to my own question, in case anybody is interested...

If you start a system with time = 0 and local time is GMT-something (any place west of Greenwich: Brasilia (GMT-3), New York (Eastern time), ...), then you get time before 1 January 1970. Well, you don't if time_t is unsigned! You get time in 2107 instead :-(


(Log in to post comments)

Copyright © 2008, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds
Powered by Rackspace Managed Hosting.