Talk:Unix time/Archives/2016

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

Negative values of "seconds since the Epoch"?

I see nothing in the standard that clearly indicates that negative values of "seconds since the Epoch" are required; time_t is specified in the page on <sys/types.h> only to be "an integer type"; size_t is specified as being "an unsigned integer type" and ssize_t and some other types are specified as being "signed integer types", so this seems to indicate that the current Single UNIX Specification allows time_t to be signed or unsigned. Guy Harris (talk) 18:28, 20 June 2016 (UTC)

What is more, the source cited ("The Open Group Base Specifications Issue 7, section 4.15 Seconds Since the Epoch". The Open Group. Retrieved May 2, 2014.) says:
"If the year is <1970 or the value is negative, the relationship [between POSIX time and UTC] is undefined."
(The signedness is in this article explained to be for enabling representation of older dates, while the reason I have heard is to make calculating differences in time more straightforward.)
--LPfi (talk) 21:41, 20 June 2016 (UTC)