Talk:Time t
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)
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.
- Added "32 bit time_t is deprecated, due to the Year 2038 problem." to the article.
—Preceding unsigned comment added by 70.7.17.202 (talk) 20:28, 15 December 2007 (UTC)
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)
- I've heard that some POSIX/Unix implementations now use a 64-bit signed integer type for
time_t
(or possibly they use a newtime64_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)
- Oppose. The ISO C
time_t
library type is not the same thing as the Unix time (or POSIX time). In fact, the latter is an OS-specific implementation of the former. Therefore the two topics deserve separate articles. — Loadmaster (talk) 02:07, 13 February 2008 (UTC)
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)