this post was submitted on 18 Jul 2024
36 points (92.9% liked)

Programming

17479 readers
221 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities [email protected]



founded 1 year ago
MODERATORS
top 6 comments
sorted by: hot top controversial new old
[–] [email protected] 1 points 4 months ago (1 children)

I really dislike those clock widgets. I have them on my phone for setting alarms. Much harder than just typing the time in.

[–] [email protected] 1 points 4 months ago (1 children)

At least on my android, if I tap the numbers at the top it allows me to just type it in.

[–] [email protected] 2 points 4 months ago

Thankfully you can, yeah.

[–] [email protected] -5 points 4 months ago (1 children)

12-hour time idiocy strikes again... Normalize clocks with numbers 0-11, dammit!

[–] [email protected] 6 points 4 months ago (1 children)

There is clocks that say 0 instead of 12? The fuck?

[–] [email protected] 4 points 4 months ago* (last edited 4 months ago)

It's more logical. The reason it's 12 is because the Romans were afraid of zeros. The "12" means either 0 hours or 12 hours after midnight while 1-11 mean 1-11 or 13-23 hours after midnight.

if (pm && numberOnClock != 12) hoursSinceMidnight = numberOnClock+12; 
else /*am or 12pm*/ 
{ 
  if (numberOnClock == 12 /*12am*/) hoursSinceMidnight = 0; 
  else /*1-11 am or 12pm*/ hoursSinceMidnight=numberOnClock; 
}

If a "0" was on top, it would be

if (pm) hoursSinceMidnight=numberOnClock+12; 
else /*am*/ hoursSinceMidnight=numberOnClock; 

TL;DR: Swap the 0 and 12 on the clock face. The inner (AM) ring now has numbers 0-11 while the outer (PM) ring has numbers 12-23. Things now make sense. We should have done this centuries ago instead of manufacturing measuring instruments whose scale starts at 12 rather than 0.