× 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 Peter,

<snip>
this all makes perfect sense to me, but what I don't get is why the %time
built-in returns 240000 if such a time doesn't even exist according to
common sense.

Bad IBM?
</snip>

Well, if IBM are working according to the ISO standards and not common
sense, then no. IBM are correct in what they are doing. The 24-hour clock is
an arbitary construct anyway. We could easily have decided on a 30-hour day
or a non-religious metric 10-day week. Modern technology and
interoperability is all about agreeing a standard and then sticking to it -
no matter what. In this case the standard was to say "There's lots of legacy
code out there on different systems using either 24:00:00 or 00:00:00 to
indicate midnight - nobody is going to change all their legacy code so lets
not fight about it and say they are the same." Of course setting one field
to 24:00:00 and comparing it to another field set to 00:00:00 will yield a
mismatch. Yet we are assured they are the same according to the standard.

I agree it is strange that the standard allowed 00:00:00 as a valid value
but IBM decided to implement 24:00:00 for %time() instead. Maybe it was
because the real time 00:00:00 could be confused with a default (not set)
value. Maybe it is something specific to the System i clock. It would be
interesting to see what the QTIME system value retrieves at exactly
midnight. Is it the same as %time()?

Sadly, common sense is not the same as logic. Given that common sense does
not sit well with quantum mechanics - the foundation upon which our whole
industry is built - I wouldn't put too much stock in our common sense
approach to computing. Schroedinger's cat was very uncommon indeed! :-)


Cheers

Larry

As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.