Back

best way to handle the 24 hr time format?

#1
i switched all my clocks to the 24 hr time format, but im wondering the logic you guys use to do this. should i try and associate all the times after 12 with the equivalent in the 12 hr time format or should i think of it in a new way and just try and "understand" it instead of trying to convert it it. i hope this made sense ^^
Reply
#2
Is this a general question? I can't remember when I switched, but I mentally subtracted 12. Now I guess it just happens so fast I don't notice. I don't think I 'translate' unless I'm mapping it to a particular event/schedule that I'm familiar with the more conventional way.
Edited: 2009-12-25, 1:26 pm
Reply
#3
I assume you're outside Europe since most us here in Europe grow up with it, but I remember being young and using 18 = 6pm as an "anchor point" to know what the time was on a 24 hour clock.
Reply
May 16 - 30 : Pretty Big Deal: Save 31% on all Premium Subscriptions! - Sign up here
JapanesePod101
#4
meolox Wrote:I assume you're outside Europe since most us here in Europe grow up with it, but I remember being young and using 18 = 6pm as an "anchor point" to know what the time was on a 24 hour clock.
And even in Europe, there are only 12 numbers on a clock, so you have o use both systems (without using an explicit pm/am) . I think when i was young, I had some sort of an image of an clock in my head where the 12h and 24h numbers stand side by side.
Reply
#5
I switched mine a while back, too. I say keep converting as long as you have to until 9pm feels like 21:00 Smile
Reply
#6
I switched a long long time ago. What I did was subtract 2 and take out the first number. For example, 17:00, take out the 1 and 7-2 = 5 (when it's in the 20's the 2 obviously becomes a 1). After a while you kind of just get used to it.

I'm terrible at math, so making myself subtract 12 would make me stop for a second to think, heh...
Reply
#7
SRS it man

no, i shouldn't laugh. We use both formats without a real preference, so I learned it early on in the game, but I remember confusing 15 with 5pm when I was a little kid.
Edited: 2009-12-25, 6:09 pm
Reply
#8
I'd think that compared to learning that that thing on hanging on the wall that measures the time is 壁に掛かっていて時を計っていて「とけい」という物, the fact that the numbers are different would be small beans indeed.

Answer: make 24-hour your official system. Keep your calendar 24-hour. Force yourself to convert to and from it when you have to deal with the unenlightened 12-hour masses.
Reply
#9
I can see putting 午前/午後 on your clocks for kanji immersion. What does a 24hour clock help with?
Reply
#10
Just take the image of the hour value under the natural homomorphism from Z to Z/12. Smile
Edited: 2009-12-25, 8:04 pm
Reply
#11
ipsencastle Wrote:What I did was subtract 2 and take out the first number. For example, 17:00, take out the 1 and 7-2 = 5 (when it's in the 20's the 2 obviously becomes a 1). After a while you kind of just get used to it.

I'm terrible at math, so making myself subtract 12 would make me stop for a second to think, heh...
Brilliant way!

I never noticed it. Yes, 18 - 2 = 16 (take out the 1 = 6), 21 - 2 = 19 (9), 14 -2 = 12 (2)

Yeah, it really works!

Thank you very much ipsencastle.
Reply
#12
(pst, thats called subtracting by 12)

(For me at least,) the whole point of being good at calculating stuff out of your head is just taking werid shortcuts.
Im not able to calculate 38*8 in one step, so what I would do is calculate 40*8, which might even be too hard for one step, so I calculate 4*8, which i know. Then I multiply it by 10 aka I add a 0 to the number. Then you just calculate 2*8 and subtract that from the total and voila Wink
Edited: 2009-12-26, 7:23 am
Reply
#13
dizmox Wrote:Just take the image of the hour value under the natural homomorphism from Z to Z/12. Smile
First, you mean R/24 to R/12. Second, that's a terrible idea: since that mapping is not injective, you lose the crucial difference between 6:00 and 18:00--the 12-hour clock isn't really R/12 but R/24 with weird names. Third, who cares enough about math to understand that? Only nerds like us.

Since we're firmly in the realm of tongue-in-cheek proposals, I recommend learning the old Sinojapanese 12-interval-per-day clock using American broadcast schedule reference points.

卯: Radio Morning Zoo (begins)
辰: Breakfast Infotainment / RMZ (continues)
巳: Gossip
午: Lunchtime Infotainment
未: Soaps
申: After-School Cartoons
酉: Dinner Infotainment
戌: Prime-time
子: Late-night shows
丑: Infomercials
寅: Bad Infomercials
Reply
#14
wildweathel Wrote:
dizmox Wrote:Just take the image of the hour value under the natural homomorphism from Z to Z/12. Smile
First, you mean R/24 to R/12. Second, that's a terrible idea: since that mapping is not injective, you lose the crucial difference between 6:00 and 18:00--the 12-hour clock isn't really R/12 but R/24 with weird names. Third, who cares enough about math to understand that? Only nerds like us.
I was just referring to the hour value which is in Z, and the image from Z to Z/12 is the same as the image from Z/24 to Z/12. Tongue

For injectivity... find a compass and look were the sun is! D=
Edited: 2009-12-26, 2:06 pm
Reply
#15
Here are a couple of ways to do it:

Algebra:
Let's define three sets M = {AM, PM}, T12 = {1,2,...,12} and T24 = {1,2,...,24}. For x∈T24, y∈T12, m∈M we have the following two cases:
If m = AM we have the following equation:
y=x (1)

If m = PM, we have the following equation:
y=x-12 (2)

Let's define another set P = {0,1} which maps to M like this:
P(0) = M(AM)
p(1) = M(PM)

We can generalize (1) and (2) in the following equation:
y=x - (12*p)
where p=P(m), p∈P.

And since this is math, it's obligatory to add some linearly independent equations, make it a system, form a matrix, and make some poor kid multiply it at home instead of doing something fun:
|y=x-(12*p)
|z=k*p+n^2
|t=v+bx
|y=6-(a+b)^(n-1)

Now, all we need to do is solve the above equation and find y. Simple, isn't it?

Or you could do it in C:
Code:
char* to12htime(int time24, int min)
{
    if(time24 < 0 || time24 > 23) return NULL;
    if(min < 0 || min > 60) return NULL;
    char* tstr = malloc(9);
    if(time24 > 12) sprintf(tstr, "%d:%d PM", time24-12, min);
    else sprintf(tstr,"%d:%d AM", time24, min);
    return tstr; // remember kids, never return dynamic buffers like this ;)
}
Now, you can call to12htime() every time you need to convert. Remember to check that return value. And free the returned buffer when you are done with it.
Edited: 2009-12-26, 7:02 pm
Reply
#16
You forgot to check for malloc() returning NULL, %2d gives a more usual display for the minutes value, and time24=0 should give "12:xx", not "0:xx" ;-)
Reply
#17
Nerds.
Reply
#18
nest0r Wrote:Nerds.
lol
Reply
#19
ipsenscastle Wrote:I switched a long long time ago. What I did was subtract 2 and take out the first number. For example, 17:00, take out the 1 and 7-2 = 5 (when it's in the 20's the 2 obviously becomes a 1). After a while you kind of just get used to it.
And if the right-most digit is less than 2, add 8 (the complement to 10).
Also works for any other subtraction, of course: 23 - 7 = 23 + (3 - 10) = 16
And for addition: 38 + 6 = 38 + (- 4 + 10) = 44

Handy abacus techniques.
Reply
#20
I haven't read all the previous posts but I have to wonder what exactly is there to "handle" or "understand"? It's really not a big deal unless you make it one.

edit = typo
Edited: 2009-12-27, 5:33 am
Reply
#21
pm215 Wrote:You forgot to check for malloc() returning NULL, %2d gives a more usual display for the minutes value, and time24=0 should give "12:xx", not "0:xx" ;-)
That's not the point. But I didn't check the result from malloc() on purpose - most non-server application are better off crashing if malloc fails.

@nest0r
I'm going to go psycho and kill some people now. I hope you are happy with what you did.
Reply
#22
Just delete two then 10 (Or 12 in one go, but it's probably faster the other way).
18 - 2 = 16 - 10 = 6. Using it a lot makes it completely automatic, it's not like you will always have to do that.
Reply
#23
unauthorized Wrote:Or you could do it in C:
Code:
char* to12htime(int time24, int min)
{
    if(time24 < 0 || time24 > 23) return NULL;
    if(min < 0 || min > 60) return NULL;
    char* tstr = malloc(9);
    if(time24 > 12) sprintf(tstr, "%d:%d PM", time24-12, min);
    else sprintf(tstr,"%d:%d AM", time24, min);
    return tstr; // remember kids, never return dynamic buffers like this ;)
}
Now, you can call to12htime() every time you need to convert. Remember to check that return value. And free the returned buffer when you are done with it.
I'll cheat and use Matlab.

Code:
mod(hour,12)
Edited: 2009-12-27, 1:02 pm
Reply
#24
unauthorized Wrote:But I didn't check the result from malloc() on purpose - most non-server application are better off crashing if malloc fails.
(waaay off topic, but) *blink*. If you want to make the program exit on malloc failure then wrap malloc. If you don't check you don't get a crash, you get undefined behaviour, and you never want that. (If you're really unlucky you get undefined behaviour which is a security hole.)
Reply
#25
I've been using 24hr clock my whole life, and weirdly it still hasn't become automatic - I still have to subtract 12.

No idea why..
Reply