× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.




Hi Bruce,

It may not be as easy as changing to unsigned as negative values have
meaning.  If you call a function such as ctime() passing a negative value
you will receive in some implementations a date prior to 1970 (-100000 for
instance is Tue Dec 30 20:13:20 1969) so you may find various library
functions not working exactly as expected...  and most developers using
time_t would probably also be using the C runtime library.

In my experience, it's VERY rare that someone does this. The computers that generate the timestamps are almost never set to date prior to 1970, so it'd be very odd for log entries to have dates like this.


For historical dates, like birthdates, it's usually desirable to be able to go further back than Dec 1901. Though, I suppose nowadays it would work, but back in the 80's when a lot of this software was designed, it wasn't acceptable, so people didn't use integers to calculate their dates. Consequently, almost all of those dates are stored as character fields.

Obviously, for those who are using the negative values in their timestamps, it's important to change to a different method of storing the dates.

But, I can't see why a date in a filesystem would ever have a need for a signed integer.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.