Regarding issue
http://bugs.freepascal.org/view.php?id=27735
Is there some convention how to show a date value "0"? By default it shows year 1899. The patch changed it to "?".
Juha

Mailing lists / lazarus / 2015-05
34 messages · 15 people · –
Reply by email Subscribe to this list Your subscription
Read-only archive. Use j and k to move between messages.
Regarding issue
http://bugs.freepascal.org/view.php?id=27735
Is there some convention how to show a date value "0"? By default it shows year 1899. The patch changed it to "?".
Juha
Il 26/05/2015 13:30, Juha Manninen ha scritto:
Delphi for value 0 shows 12/30/1899 12:00 am:
http://docs.embarcadero.com/products/rad_studio/delphiAndcpp2009/HelpUpdate2/EN/html/delphivclwin32/System_TDateTime.html
Changing the old Delphi compatible default may force a number of users to modify user manuals/user instructions, messages etc. Is it really a wise move?
Giuliano
Regarding issue http://bugs.freepascal.org/view.php?id=27735 Is there some convention how…
Juha Manninen wroteIs there some convention how to show a date value "0"? By default it shows year 1899. The patch changed it to "?".
Both funny, as DateTimeToStr(2.0) is "1-1-00" ;-)
-Michael
Il 26/05/2015 13:30, Juha Manninen ha scritto: Delphi for value 0 shows 12/30/1899 12:00…
Which is an entirely valid date, so should be displayed as such; it could entirely plausibly be a default starting point for e.g. astronomical calculations.
If it were something like Anno Domini 0, which quite simply never existed, then it could be displayed as invalid.
It's funny, but AFAIK, you are right. By definition, before Year 1 there was Year -1 and not Year 0.
Why TDateTime seemingly uses +2 = 1-1-0000 as a reference is still another riddle.
-Michael
Il 26/05/2015 13:30, Juha Manninen ha scritto: Delphi for value 0 shows 12/30/1899 12:00…
Amazing! Nobody actually looked at the Mantis report nor the patch I referred to, but still answered the mail.
The question is about LastUsed date of a Lazarus package link, shown in one of the IDE's dialog windows.
Value "0" is wrong in this context because nobody created Lazarus packages nor links between them at year 1899.
I leave it as "?", I guess there is no convention for such situations.
... but people please pay a little more attention before answering ...
Juha
I changed it to "Never" as suggested by wp. It is a good word in this context.
Juha
Both funny, as DateTimeToStr(2.0) is "1-1-00" ;-) -Michael
Why should that be funny? TDateTime(0.0) is defined as "12/30/1899 12:00 am". Now add two days and we are at "1/1/1900 12:00 am", so all is well...
Regards,
Sven
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20150527/41788110/attachment.html>
Does 12:00 am actually exist ? If so, what is that ? Midnight or midday ? Should not that be 00:00 am ? (or is that the same ?)
Michael.
am". Now add two days and we are at "1/1/1900 12:00 am", so all is well...
Does 12:00 am actually exist ? If so, what is that ? Midnight or midday ? Should not that be 00:00 am ? (or is that the same ?)
Honestly I don't know, as I simply copy-pasted the value mentioned by Mark, since I'm on mobile and thus a bit lazy ;)
Regards,
Sven
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20150527/6218176f/attachment.html>
Does 12:00 am actually exist ? If so, what is that ? Midnight or midday ? Should not that…
[...] Does 12:00 am actually exist ? If so, what is that ? Midnight or midday ? Should not that be 00:00 am ? (or is that the same ?)
You are not alone with such questions:
https://en.wikipedia.org/wiki/12-hour_clock#Confusion_at_noon_and_midnight
Mattias
We were taught that 24.00 did not exist. Time went from 23.59 to 00.00. The same rule can be applied to 11.59 am & pm.
Gordon.
Why should that be funny? TDateTime(0.0) is defined as "12/30/1899 12:00 am". Now add two…
To me (being born 12/31) it's funny that that the base is not a 1/1, especially 1/1/0001. But of course this is completely irrelevant.
-Michael
Does 12:00 am actually exist ? If so, what is that ? Midnight or midday ? Should not that…
Michael Van Canneyt wroteDoes 12:00 am actually exist ? If so, what is that ? Midnight or midday ?
Hence I stick to 24 hour time. ;-)
Regards,
- Graeme -
We were taught that 24.00 did not exist. Time went from 23.59 to 00.00. The same rule…
Gordon Cooper wroteWe were taught that 24.00 did not exist. Time went from 23.59 to 00.00. The same rule can be applied to 11.59 am & pm.
Except where there's a leap second.
The same rule can be applied to 11.59 am & pm.
No it can't. You have to be prepared to parse 12:00 a.m. by context but it's usually midnight.
This is a deeply messy area, not helped at all by the odd conventions adopted by some of the early RTC chips which still turn up in embedded equipment.
To me (being born 12/31) it's funny that that the base is not a 1/1, especially 1/1/0001.…
Michael Schnell wroteTo me (being born 12/31) it's funny that that the base is not a 1/1, especially 1/1/0001. But of course this is completely irrelevant.
TDateTime's value of 0 being 1899-12-30 is something Borland adopted from Microsoft to be compatible with Microsoft's Excel or Access. And in turn Microsoft Excel tried to be compatible with Lotus 1-2-3. Back in the 90's I searched the internet for the explanation, but can't remember the details any more.
A quick google search now revealed this page, though it doesn't go into much detail.
"It appears that the reason for Delphi starting at 30 Dec 1899 is to make it as compatible as possible with Excel while at the same time not adopting Excel's incorrectness about dates."
[http://www.delphibasics.co.uk/RTL.asp?Name=TDateTime]
Do an internet search for "Microsoft date starts at 1899-12-30" and you'll find a lot more information.
Regards,
- Graeme -
Except where there's a leap second. No it can't. You have to be prepared to parse 12:00…
Of which day the one that also has 0:pm or of the previous ?
-Michael
Wp "12-hour clock" shows 11:59 p.m. followed by 12:00 a.m., but I'm not 100% confident in this and sometimes you just have to guess :-)
Of course there's the interesting case where there's a leap second as well, because anybody foolish enough to insist on the 12 hour clock would see something like 11:59:59 11:59:60 p.m. 12:00:00 a.m.
Anybody with the least bit of sense uses ISO-8601 and 24-hour clock, but it's still possible to get into deep water when one gets things like astronomical observations or timezone offsets. Unfortunately there's a lot of legacy data and embedded kit floating around where timestamps are reported as BCD plus flag bits, and in particular there's things like (derivatives of) the 146818 chip which are both buggy and flexible enough that a firmware writer can make every conceivable bad decision leaving a heck of a mess for the poor so-and-do who has to make sense of logged data remotely.
Amazing! Nobody actually looked at the Mantis report nor the patch I referred to, but…
Mea culpa. But this sort of thing bites me so often that it's something I'm touchy about.
Does 12:00 am actually exist ? If so, what is that ? Midnight or midday ? Should not that…
Michael Van Canneyt wroteDoes 12:00 am actually exist ? If so, what is that ? Midnight or midday ? Should not that be 00:00 am ? (or is that the same ?)
yes... 12:00am is midnight... 00:00am is the same... so also is 00:00 or 24:00 in 24hour time...
waldo kitty wroteyes... 12:00am is midnight... 00:00am is the same... so also is 00:00 or 24:00 in 24hour time...
AFAIK it's rather set that 24:00 is 00:00 the next day, but 12:00 am is "not 100% confident" as Mark says.
-Michael
Il 28/05/2015 11:18, Michael Schnell ha scritto:
I don't believe this discussion will lead anywhere. The am/pm notation was intended only for humans living outside the polar circles, which just looking out of the window, can easily tell apart midnight from noon. And if they must set the hour for a meeting they don't say "at 12 pm" or "at 0 pm" or whatever, but just "at noon".
Even the (underdeveloped) countries which still stick to am/pm notation, when must give the train timetable or the airplane schedules, use the 24h notation.
Just my 2c
Giuliano
AFAIK it's rather set that 24:00 is 00:00 the next day, but 12:00 am is "not 100%…
i don't know why it isn't confident... am is morning so 12am is the very first entry into morning as 12pm is the very first entry into afternoon...
i don't understand the confusion or the problem...
Day runs from 00:00:00 to 23:59:59 (or ::60) in 24h format ;) There is no 24:00:00 :) and must not be :)
What of 00:00 AM then ? Same as 12:00 AM ?
S'pose it depends on who uses it ;)
i don't understand the confusion or the problem...
The confusion was what to convert Val(TdateTime) == 0 to ...in package view :)
el es
i don't know why it isn't confident... am is morning so 12am is the very first entry into…
waldo kitty wrotei don't know why it isn't confident... am is morning so 12am is the very first entry into morning as 12pm is the very first entry into afternoon... i don't understand the confusion or the problem...
So the day starts with 12 at midnight and then switches to 1 an hour later? If that isn't confusing...
yes... 12am and 00:00am and 00:00 (24 hour mode) are all the same...
If that isn't confusing...
it isn't... it never has been, really... i've been using that form for over 50 years with no problems... granted, it doesn't work well with mod12 too well but then noon would be 00:00pm so there has to be some adjustment in code for the human aspect of rendering... it isn't that complicated... i was telling the time correctly by the time i was 3 or 4 and i know that my oldest granddaughter was doing so by 3 because i had a hand in her early education... it wasn't until i was older that i learned military 24 hour nomenclature... then later after that was the 100 minute hour they also use(d?)...
So the day starts with 12 at midnight and then switches to 1 an hour later? If that isn't…
In am/pm mode, this is how it goes indeed. When it is 30 minutes past midnight, you say it is 12:30 (implicit am). An hour later, it becomes 1:30. In military time (24 hrs), then they become 00:30 and 1:30.
Stephano
So the day starts with 12 at midnight and then switches to 1 an hour later? If that isn't…
In fairness "12 Noon" is a common English idiom while "zero midnight" isn't. If using the 12-hour clock it's common to say "five to twelve" shortly before either midday or midnight and "five past twelve" afterwards... I've never heard anybody say "five past zero".
So I'd expect "12 Midnight" to not give anybody major problems.
But I still avoid setting equipment which reports time using a.m./p.m. around midnight or midday- who knows what ghouls lurk in the firmware.
So the day starts with 12 at midnight and then switches to 1 an hour later? If that isn't…
Wikipedia tries to de-confuse a bit:
https://en.wikipedia.org/wiki/12-hour_clock
https://en.wikipedia.org/wiki/12-hour_clock#Confusion_at_noon_and_midnight
Other countries may have other conventions ...
For the germans:
https://de.wikipedia.org/wiki/2-mal-12-Stunden-Z%C3%A4hlung
HTH,
Marc
I once worked in the international section of the New Zealand Meteorological Servce, which used Greenwich Time (UTC). So, each day started at noon, 12 hours behind local time. Plenty of scope for confusion there.
Fortunately this was several decades before computers appeared.
Gordon.
Marc Santhoff wrote> So the day starts with 12 at midnight and then switches to 1 an hour later? > >If that isn't confusing...
Except where there's a leap second. No it can't. You have to be prepared to parse 12:00…
speaking of which, guess what is coming up...
[quote]
Date: Mon, 05 Jan 2015 14:25:49 +0100
From: IERS EOP Product Center
Reply-To: IERS EOP Product Center
To:
INTERNATIONAL EARTH ROTATION AND REFERENCE SYSTEMS SERVICE (IERS)
SERVICE INTERNATIONAL DE LA ROTATION TERRESTRE ET DES SYSTEMES DE REFERENCE
SERVICE DE LA ROTATION TERRESTRE DE L'IERS
OBSERVATOIRE DE PARIS
61, Av. de l'Observatoire 75014 PARIS (France)
Tel. : 33 (0) 1 40 51 22 26
FAX : 33 (0) 1 40 51 22 91
e-mail :
http://hpiers.obspm.fr/eop-pc
Paris, 5 January 2015
Bulletin C 49
To authorities responsible for the measurement and distribution of time
UTC TIME STEP
on the 1st of July 2015
A positive leap second will be introduced at the end of June 2015. The sequence of dates of the UTC second markers will be:
2015 June 30, 23h 59m 59s
2015 June 30, 23h 59m 60s
2015 July 1, 0h 0m 0s
The difference between UTC and the International Atomic Time TAI is:
from 2012 July 1, 0h UTC, to 2015 July 1 0h UTC : UTC-TAI = - 35s from 2015 July 1, 0h UTC, until further notice : UTC-TAI = - 36s
Leap seconds can be introduced in UTC at the end of the months of December
or June, depending on the evolution of UT1-TAI. Bulletin C is mailed every
six months, either to announce a time step in UTC or to confirm that there
will be no time step at the next possible date.
Daniel Gambis
Head
Earth Orientation Center
of IERS
Observatoire de Paris, France
[/quote]
;) O:)
I once worked in the international section of the New Zealand Meteorological Servce,…
Gordon Cooper wroteI once worked in the international section of the New Zealand Meteorological Servce, which used Greenwich Time (UTC). So, each day started at noon, 12 hours behind local time. Plenty of scope for confusion there.
But was conveniently in line with the astronomical convention of the day
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk
[Opinions above are the author's, not those of his employers or colleagues]
In am/pm mode, this is how it goes indeed. When it is 30 minutes past midnight, you say…
I must say that I'm amazed at how long this thread is - but then I shouldn't be.
Many moons ago, I used to work at the long gone British Mainframe Computer company ICL. Here, there was a well used term "a bicycle sheds argument". This supposedly came from the sales force retelling how the board of a large company had once taken two minutes to approve the purchase of a multi-million pound mainframe and then spent the next two hours discussing a small bill for the repair of the office bicycle shed. This was allegedly because they all understood bicycle sheds, but none of them had a clue how a computer worked.
This thread could well be an example of such an argument.
Perhaps we should leave it as:
The 24 hour clock is a modulo 24 numbering system, 12 hour clock is a modulo 12 numbering system starting at midnight and noon, where zero is conventionally written as "12", with conventions distinguishing the periods between noon and midnight and midnight and noon.
As to why this is so, I would quote the late great Douglas Adams "because the stupid monkey didn't know any better".
Tony
:-)
Yes, I think that's a good informal description. Particularly in view of the fact that efforts were made to measure time in Europe before numeric zero was widely adopted.
Now please let's not get bogged down in "unequal hours".