× 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.



Peter.Colpaert wrote:

1. 00:00:00 or 24:00:00 (Peter.Colpaert)

One of our processes involves parsing a directory listing of a windows shared drive, and there are 6 files which cause problems.

These files have an entry in the listing as follows:

01/01/2000 12:00a 438,082 GN0229084.JPG

The listing is parsed by two different programs (one made by me, the other made several years ago by another developer).

His program (using pre-bif methods) returns the time as 00:00:00, whereas mine (using the %time built-in function) returns 24:00:00

First of all, I'd like to know whether January 1, 2000 00:00:00 is the same as January 1, 2000 24:00:00 (I would think that the latter actually means January 2).

(I know, this was beaten into the ground; but I gotta add my opinion after just getting back...)

My purely personal opinion is that hour '24' cannot be valid. Hour '24' implies that hour '24' has minutes '00' through '59' and the time '24:15' doesn't exist. True, the implication is a logical one, not enforced by standards. But programming should have a logical foundation. (Ignoring Daylight Saving Time, leap-years, etc., since we need to handle all special cases as... "special cases" anyway.)

Also, when comparing hours with minutes or seconds, why would anyone expect hours to range up to '24', but minute '60' and second '60' wouldn't be allowed? Minutes and seconds start at '00', so hours should be consistent. Is '24:60:60' a valid time? If so, what time is it?

IMO, hour '24' ought to be tossed onto the heap of discarded nonsense. Much like division by zero...

Also, "12noon" must be /neither/ AM nor PM. The conceptual use of 'AM' is 'before noon' (ante meridiem) and 'PM' is 'after noon' (post meridiem). "Noon" can be neither 'before' nor 'after' "noon". Similarly, "12midnight" is 'special'. "Noon" is not part of the morning nor part of the afternoon; it is the point that marks the boundary between them. (Is your property line part of your property? or your neighbor's?) But I'm totally lost on what that means. Sigh.

Purely opinion, not based upon expertise with standards.

Tom Liotta


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.