24 hour clock, without seconds

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

24 hour clock, without seconds

Ben Asselstine
Hello,

My apologies if I'm sending this to the wrong place.

After perusing strftime and friends, I see no easy way to get a
24-hour clock with hours and minutes in the current locale.  `%H:%M'
isn't right because the separator might not be `:'.  `%X' isn't right
because I don't want seconds.  `%r' isn't right because it does a 12
hour clock.  `%R' isn't right because it's not in the current locale.

Is this a deficiency, or am I just out to lunch.

regards,

Ben
Reply | Threaded
Open this post in threaded view
|

Re: 24 hour clock, without seconds

Danilo Segan
Today at 0:35, Ben Asselstine wrote:

> My apologies if I'm sending this to the wrong place.
>
> After perusing strftime and friends, I see no easy way to get a
> 24-hour clock with hours and minutes in the current locale.  `%H:%M'
> isn't right because the separator might not be `:'.  `%X' isn't right
> because I don't want seconds.  `%r' isn't right because it does a 12
> hour clock.  `%R' isn't right because it's not in the current locale.
>
> Is this a deficiency, or am I just out to lunch.

It's a deficiency: there are no enough formats for dates and times in
POSIX locale specifications (time *and* date, date, time, time in
am/pm notation are the only available formats).

There's attempt to fix that on http://live.gnome.org/LocaleProject,
but we have not moved forward enough.

Cheers,
Danilo