CIA and US time (am/pm)

Started by MIRKOSOFT, August 11, 2010, 08:51 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

MIRKOSOFT

Hi!


I have Q which is maybe to other forum, but need help:
if is EU time 12:00 - is US time 12:00am ?
if is EU time 0:00 - is US time 12:00pm ?
it's for switching time in CIA ampm


Many thanks for replies.


Miro
MIRKOSOFT of megabytes

Commodore 64 was great, Commodore 128 is bigger, better, faster and more!!!

http://www.mirkosoft.sk

BigDumbDinosaur

The continental USA ranges from UTC-5 to UTC-8, standard time.  Your local time depends on your location.  If you are in Berlin, you are UTC+1, standard time.  Therefore, if it is midnight in Berlin, it is 5 PM in New York City.
x86?  We ain't got no x86.  We don't need no stinking x86!

Hydrophilic

I don't understand your question.  The CIA has no concept of time zones.  Bit 7 of the hour's register ($DC08 / $DD08) indicates AM/PM as far as I know...  very intersting... I will investigate...
I'm kupo for kupo nuts!

MIRKOSOFT

I'm sorry that Iwrote it so confusing.
The Q is abot AM/PM time:
we have in EU time 0:00 - 23:59
US time is AM/PM 12hrs...


So, if I want display 12:00 (middle of day) in US format is it 12:00am?
And if I want display 00:00 (midnight) in US format is it 12:00pm?


Thanks for answer.


Miro
MIRKOSOFT of megabytes

Commodore 64 was great, Commodore 128 is bigger, better, faster and more!!!

http://www.mirkosoft.sk

gsteemso

Technically, _exactly_ 12:00 in the middle of the day is noon and neither AM nor PM (which abbreviations stand for the Latin for Before and After Midday), but we call it 12:00 PM because most of that particular minute (say 12:00:00.0000000....0001 through 12:59:59) happens after the exact moment of noon. Similarly, midnight is called 12:00 AM because most of the minute with that name happens the next morning.

This gave me a dreadful headache when I was a small child first trying to understand it, but is internally consistent.
The world's only gsteemso

BigDumbDinosaur

Quote from: MIRKOSOFT on August 11, 2010, 09:05 PM
I'm sorry that Iwrote it so confusing.
The Q is abot AM/PM time:
we have in EU time 0:00 - 23:59
US time is AM/PM 12hrs...


So, if I want display 12:00 (middle of day) in US format is it 12:00am?
And if I want display 00:00 (midnight) in US format is it 12:00pm?


Thanks for answer.


Miro

00:00 = 12:00 AM

12:00 = 12:00 PM
x86?  We ain't got no x86.  We don't need no stinking x86!

LokalHorst

I found that most Software and also my radio-controlled clock (when set to 12h mode) showing midnight as 00:00am , there seem to be 2 variants.

gsteemso

Lokalhorst: What do you mean, two variants? You’re the third of us to point out the same answer.
The world's only gsteemso

LokalHorst

#8
I meant, midnight shown as 00:00am vs. 12:00am

I personally prefer the 24h format, which is non-ambiguous. Analog-clocks are from the past.
Imagine the following:
Sergeant: "Roll call tomorrow zero-six-hundred"
Private: "Sir Serge, A.M. or P.M. Sir?"

gsteemso

Ah, somehow I missed that. I have never seen 12 hour time use a zero. Interesting.

I fully agree that 24 hour time is much more logical and less ambiguous, but the 12-hour format is what people grow up with Over Here â€" and unless you join the military or get a job involving shift work, there is little incentive to switch over, not when compared with the mental gear-clashing caused by having to convert between the 24 hour time on your watch and the 12 hour time every person, sign and television around you is using. A lot of people around here are so innumerate they can’t even multiply by 10 without a calculator â€" adding and subtracting 12 all the time is well beyond most of them.
The world's only gsteemso

Hydrophilic

#10
BDD gave a really concise answer.  But let me elaborate for anyone who can't extrapolate the meaning...

The 12-hour (am/pm) clock is really archaic... it goes back to the era before zero...

What is this you say?

Before zero.

What is before zero?

One, and every whole number after.

WHAT ARE YOU SAYING!!!???

Don't get your panties in a wad... I know it may be difficult for modern people to understand (people who know of zero)... but for many centuries zero was an unknown number for the mass population...

So instead of the archaic clock going from zero to eleven (0...11) it goes from one to twelve (1...12).  Old brains seemed to handle the concept better.  My new brain can't explain why!

And why was the archaic clock divided by two (12 instead of 24)?  I don't know!  Maybe old brains couldn't handle numbers bigger than twelve (12) ??  Or why didn't they just make an hour twice as long ??? I don't know that either... society NEVER consults me on such importnat matters... fools!

Anway, this is how I convert 12-hr am/pm time (archaic time = AT) to more logical 24-hr time (LT)

0 REM ARCHAIC TO LOGICAL
10 LT = AT : IF LT = 12 THEN LT = 0
20 IF PM THEN LT = LT + 12

and the converse

0 REM LOGICAL TO ARCHAIC
10 IF LT >= 12 THEN AT = LT - 12 : PM = 1 : ELSE AT = LT : PM = 0
20 IF AT = 0 THEN AT = 12

It's all pretty silly if you ask me!  So here is another summary for those that don't understand the BASIC written above...

Logical Time 00:00 to 00:59 map to Archaic Time 12:00 AM to 12:59 AM, and Logical Time 01:00 to 11:59 map to Archaic Time 1:00 AM to 11:59 AM

and

Logical Time 12:00 to 12:59 map to Archaic Time 12:00 PM to 12:59 PM, and Logical time 13:00 to 23:59 map to Arachaic Time 1:00 PM to 11:59 PM

I hope that makes sense.  More importantly, I hope I didn't screw anything up!

BTW, this concerns only the hours.  The minutes (or seconds) need no conversion.

Also, I heard this is some sort of bug with the CIA and the AM/PM flag... but it only affects the TOD alarm??  I'm not really sure, just thought I should warn you CIA programmers.  BDD might have more insight on the bug...
I'm kupo for kupo nuts!

BigDumbDinosaur

Quote from: Hydrophilic on August 16, 2010, 11:40 PMAlso, I heard this is some sort of bug with the CIA and the AM/PM flag... but it only affects the TOD alarm??  I'm not really sure, just thought I should warn you CIA programmers.  BDD might have more insight on the bug...
Actually, the bug involves what happens when the alarm is set so the tenths of seconds value is zero, e.g., 12:20.0 PM.  In such a case the alarm won't "go off."  The solution, of course, is to set the alarm with a non-zero tenths value, e.g., 12:20.1 PM.

It seems that just about every I/O chip produced by CSG had some sort of erratum.  The CIA had several, the alarm clock interrupt bug being one, and the timer B underflow interrupt bug being another.  The latter is responsible for fake RS-232 errors in some C-64s and C-128s.  It doesn't exist in all machines but has been found in about 60 percent of the CIAs that have been checked for this error.
x86?  We ain't got no x86.  We don't need no stinking x86!