Jump to content

Talk:Time t

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

Syntax mistake

[edit]

old line struct tm ts; received compile error - it's syntax mistake. — Borland-c, 2007-02-05T15:40:06.

Not in ISO C, it's not, nor is it an error in ISO C++. Omitting the "struct" results in a syntax error in C. Your compiler must be broken. — Loadmaster 21:46, 15 February 2007 (UTC)[reply]

Shouldn't this mention the signed 32 bit '2038 bug' more prominently?

[edit]

It's linked at the bottom, but it is an issue that should be addressed in all new code and data designs being considered into the future.

If you don't already know what time_t is (i.e. you're reading this article to find out), you should be educated about why 32 bit time_t is an insidious issue.

Added "32 bit time_t is deprecated, due to the Year 2038 problem." to the article.
And was promptly deleted again.

—Preceding unsigned comment added by 70.7.17.202 (talk) 20:28, 15 December 2007 (UTC)[reply]

time_t is still a 32-bit type on all systems I'm familiar with. (I wouldn't be surprised if it were 64-bit on some systems, but I don't know of any off the top of my head.) Wikipedia can't unilaterally declare time_t "deprecated" if no major vendor has ever described it that way. I'll change the "deprecated" sentence to read: "A 32-bit time_t type is susceptible to the Year 2038 problem." and leave it at that. If anyone finds a reliable claim that anyone in industry cares about the Year 2038 problem, please amend it. --Quuxplusone (talk) 06:33, 4 January 2009 (UTC)[reply]

I've heard that some POSIX/Unix implementations now use a 64-bit signed integer type for time_t (or possibly they use a new time64_t type altogether), which alleviates some of the Year 2038 problem. I don't know how such systems handle the reading and writing of old file formats containing 32-bit time values, though. No definitive solution has yet been adopted yet, however. (See [1], [2], [3], [4], [5].)  | Loadmaster (talk) 16:33, 21 January 2009 (UTC)[reply]

Merge with Unix time

[edit]

It's been over a month since the merge was proposed, and as far as I can tell, I'm the only one who commented on it. So I've removed the {{mergeto}} tag from the article. — Loadmaster (talk) 22:57, 12 March 2008 (UTC)[reply]