A Date object stores the number of seconds since 12:00 AM on 1 Jan 1904. Hopefully this means since midnight on that day (i.e. 00:00) but I can’t be sure as officially, 12:00 AM is ambiguous (see the National Physical Laboratory website http://www.npl.co.uk/reference/faqs/is-midnight-12-am-or-12-pm-faq-time), where it states “There are no standards established for the meaning of 12 a.m. and 12 p.m.”
As the NPL says “… to avoid confusion it is always better to use the 24-hour clock, when … 24:00 Sunday or 00:00 Monday both mean 12 midnight Sunday/Monday”
@Paul Lefebvre can change that. Maybe even add something like:
Dim d as new date(1904, 1, 1, 0, 0, 0) // Total Seconds equal 0
Note: to people don’t understanding the issue, in some countries that use AM/PM, AM could be used as 00:00 for that day (as the Date document use it), or 24:00 for that day (this way 0 Total Seconds will be 00:00 hrs, January 2, 1904).
@Paul Lefebvre can change that. Maybe even add something like:
Dim d as new date(1904, 1, 1, 0, 0, 0) // Total Seconds equal 0
Note: to people don’t understanding the issue, in some countries that use AM/PM, AM could be used as 00:00 for that day (as the Date document use it), or 24:00 for that day (this way 0 Total Seconds will be 00:00 hrs, January 2, 1904).[/quote]
note that even on a 24 hour clock 00:00:00 and 24:00:00 denote “midnight”
That said the base date is midnight, 00:00:00 January 1, 1904.
And being ex-military involved with multi-nation communication, I can also add weight to the fact that there is no such time in any global, official communication of 24:00:00. There is 23:59:59 and the next second is 00:00:00.
I have worked as a contractor for the Air Force for 15 years and never used 24:00:00 in communication, it is always 23:59:59 or 00:00:00, there is no 24:00:00
[quote]Dave S: I’m curious …
So how do other parts of the world differentiate between before “mid-day” and after? I assume they don’t use a 24 hour clock?[/quote]
Actually they do. The 24 hour clock is used in everyday speech in a wide range of countries and languages.
As for the existence or otherwise of 24:00:00, please check the NPL web-page I quoted in the OP. According to them (and they are the people responsible for physical standards in the UK, and whom we can therefore assume to be authoritative), it does exist, and is the same instant as 00:00:00 the following day (and therefore completely redundant). The reason it is not used is because it’s redundant, not because it doesn’t exist.
Thanks Kem for the update to the documentation which removes the ambiguity.
[quote=423341:@Dave S]I’m curious …
So how do other parts of the world differentiate between before “mid-day” and after? I assume they don’t use a 24 hour clock?[/quote]
If I am using a digital time (always the case on a computer) I always use a 24 hour clock, and never use am or pm. In everyday speech I might, and of course the wall (analogue) clock is a 12 hour clock.
[quote=423485:@Richard Francis]Actually they do. The 24 hour clock is used in everyday speech in a wide range of countries and languages.
As for the existence or otherwise of 24:00:00, please check the NPL web-page I quoted in the OP. According to them (and they are the people responsible for physical standards in the UK, and whom we can therefore assume to be authoritative), it does exist, and is the same instant as 00:00:00 the following day (and therefore completely redundant). The reason it is not used is because it’s redundant, not because it doesn’t exist.
Thanks Kem for the update to the documentation which removes the ambiguity.
cheers,
Richard[/quote]
Not only does it exist there is also the very real possibility of having a valid time that is 23:59:60 should a positive leap second need to be added. ISO 8601 and NPL both make note of this possibility. There is also the possibility that a negative leap second needs to be added which could result in the time going from 23:59:58 to 24:00:00. Such fun!