Jump to content




Proper 24-hour time format.


  • You cannot reply to this topic
17 replies to this topic

#1 Nothy

  • Members
  • 249 posts
  • LocationMars

Posted 03 March 2016 - 11:40 AM

Basically fixing the fact that when using 24-hour time format (textutils api)
When the time is for example 1:04 AM, it will show 1:04 instead of 01:04, which is insanely irritating.

And it would be easier to have since it will have the same text size all the time, so you don't have to allocate more space to compensate for the fact that it will move when going from 9:59 to 10:00.

It's just my opinion though. I'm sure you could compensate for this, but I'm lazy and would rather see it implemented as I'm sure it would help a lot of people.

#2 Goof

  • Members
  • 751 posts

Posted 03 March 2016 - 04:07 PM

Yeah, This is really annoying for me aswell.
I know. It can be done with custom functions, but i hope this suggestion is up for being added in a future update.

Edited by Mikk809h, 03 March 2016 - 04:07 PM.


#3 PixelToast

  • Signature Abuser
  • 2,265 posts
  • Location3232235883

Posted 03 March 2016 - 10:44 PM

i dont know, here in the US we do 1:04 instead of 01:04
and google seems to agree http://i.imgur.com/IEID4BK.png http://i.imgur.com/S7eDKQQ.png

because im used to seeing it this way, the added 0 makes it less readable

#4 MKlegoman357

  • Members
  • 1,170 posts
  • LocationKaunas, Lithuania

Posted 04 March 2016 - 06:19 AM

I like the current format too.

#5 Nothy

  • Members
  • 249 posts
  • LocationMars

Posted 04 March 2016 - 11:11 AM

View PostPixelToast, on 03 March 2016 - 10:44 PM, said:

i dont know, here in the US we do 1:04 instead of 01:04
and google seems to agree http://i.imgur.com/IEID4BK.png http://i.imgur.com/S7eDKQQ.png

because im used to seeing it this way, the added 0 makes it less readable
But in Europe we use military time, which means that midnight is 0000, or 00:00. And it's really irritating to have to program something just to add a 0.

And google does not agree, I guess it is based on time zones. http://i.imgur.com/hb6WiQo.png

#6 HPWebcamAble

  • Members
  • 933 posts
  • LocationWeb Development

Posted 04 March 2016 - 10:43 PM

A quick search on Google Images for military time turns up results that mostly add the 0 before times like 1:00

But it is technically still 'correct' with or without the zero, since adding a zero simply changes the look, not the time shown.


View PostNothy, on 04 March 2016 - 11:11 AM, said:

And google does not agree, I guess it is based on time zones. http://i.imgur.com/hb6WiQo.png

Um.. what? PixelToast was showing that Google doesn't add the 0, that time would never have a 0 at the beginning anyway.

#7 MKlegoman357

  • Members
  • 1,170 posts
  • LocationKaunas, Lithuania

Posted 05 March 2016 - 07:22 AM

Why does everyone keep refering to it as "military time"? It's simply a 24-hour format.

#8 KingofGamesYami

  • Members
  • 3,002 posts
  • LocationUnited States of America

Posted 05 March 2016 - 01:14 PM

View PostMKlegoman357, on 05 March 2016 - 07:22 AM, said:

Why does everyone keep refering to it as "military time"? It's simply a 24-hour format.

In the United States, the military uses 24 hour format. Everyone else uses 12 hour.

#9 wilcomega

  • Members
  • 466 posts
  • LocationHolland

Posted 05 March 2016 - 04:23 PM

24 hour master race! why use the same number twice when we (europeans) are clearly smart enough to remember more numbers than 24! i know right! its crazy!

#10 KingofGamesYami

  • Members
  • 3,002 posts
  • LocationUnited States of America

Posted 05 March 2016 - 06:55 PM

View Postwilcomega, on 05 March 2016 - 04:23 PM, said:

24 hour master race! why use the same number twice when we (europeans) are clearly smart enough to remember more numbers than 24! i know right! its crazy!

Yeah, we had to make room for all the imperial unit conversions. (We learn metric anyway... go figure)

#11 manu_03

  • Members
  • 84 posts
  • LocationSpain

Posted 05 March 2016 - 08:18 PM

I don't know in other european countries, but in Spain we refer to 16:00 / 4:00 PM as "las 4 de la tarde" (lit. "4 o' clock in the afternoon"), but most clocks here use 24-hour/military time, it uses less space but it's well readable. For example, my hand watch doesn't use the 0, but it puts the hour 1 space right [16:00] [ 8:00]

#12 wilcomega

  • Members
  • 466 posts
  • LocationHolland

Posted 06 March 2016 - 04:03 PM

View Postmanu_03, on 05 March 2016 - 08:18 PM, said:

I don't know in other european countries, but in Spain we refer to 16:00 / 4:00 PM as "las 4 de la tarde" (lit. "4 o' clock in the afternoon"), but most clocks here use 24-hour/military time, it uses less space but it's well readable. For example, my hand watch doesn't use the 0, but it puts the hour 1 space right [16:00] [ 8:00]

same for most european countries i have been to, i live in the Netherlands

#13 gril002

  • Members
  • 38 posts

Posted 07 April 2016 - 04:04 PM

Yeah the 24 hour format is just military time which should be 05:30. I am guessing you americans are using the AM/PM sistem most of the time anyway.... so please add the 0

#14 moTechPlz

  • Members
  • 40 posts

Posted 07 April 2016 - 04:49 PM

Why not just rewrite the format code from textutils?

function formatTime24h( nTime )
  local nHour = math.floor( nTime )
  local nMinute = math.floor( ( nTime - nHour ) * 60 )
  return string.format( "%02d:%02d", nHour, nMinute )
end

Edited by moTechPlz, 07 April 2016 - 04:51 PM.


#15 Nothy

  • Members
  • 249 posts
  • LocationMars

Posted 08 April 2016 - 11:58 AM

View PostmoTechPlz, on 07 April 2016 - 04:49 PM, said:

Why not just rewrite the format code from textutils?

function formatTime24h( nTime )
  local nHour = math.floor( nTime )
  local nMinute = math.floor( ( nTime - nHour ) * 60 )
  return string.format( "%02d:%02d", nHour, nMinute )
end
Why not just add it into CC as a native thing?

#16 EveryOS

  • Members
  • 570 posts
  • LocationOver there ->

Posted 08 April 2016 - 05:24 PM

Just use tostring and string.len. I did that.

#17 TheRockettek

  • Members
  • 547 posts
  • LocationRem is best girl

Posted 09 April 2016 - 02:03 PM

Bai post...

Edited by TheRockettek, 15 April 2016 - 07:56 PM.


#18 TheRockettek

  • Members
  • 547 posts
  • LocationRem is best girl

Posted 09 April 2016 - 02:09 PM

View PostPixelToast, on 03 March 2016 - 10:44 PM, said:

i dont know, here in the US we do 1:04 instead of 01:04
and google seems to agree http://i.imgur.com/IEID4BK.png http://i.imgur.com/S7eDKQQ.png

because im used to seeing it this way, the added 0 makes it less readable

It depends where you are in the world that it decides 12/24 hour clock. For example when i google 'time'

Posted Image

Its in 24 hour





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users