tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Support for tv_sec=-1 (one second before the epoch) timestamps?



On 12.12.2018 22:27, Joerg Sonnenberger wrote:
> On Wed, Dec 12, 2018 at 08:46:33PM +0100, Michał Górny wrote:
>> While researching libc++ test failures, I've discovered that NetBSD
>> suffers from the same issue as FreeBSD -- that is, both the userspace
>> tooling and the kernel have problems with (time_t)-1 timestamp,
>> i.e. one second before the epoch.
> 
> I see no reason why that should be valid or more general, why any
> negative value of time_t is required to be valid.
> 
> Joerg
> 

I disagree, this used to be a flaw in C/POSIX interface to keep one
specific point of time invalid. It should be fixed similarly to other OSes.

Maintaining signed (negative) time_t is another and more generic topic.
In real life it's often needed to store time_t pointing before the UNIX
epoch.

Attachment: signature.asc
Description: OpenPGP digital signature



Home | Main Index | Thread Index | Old Index