Can you switch the Locale()?

Date: 2006-06-20 09:33 pm (UTC)
If so, then there are several Locale settings which will give a default 24 hour clock (and for long formats, still use English). I've written two really small classes, one of which will print out all System properties, and another which will show the different locales and a Date formatted to that locale. To set the locale right it seems you need to use -D flag to set both user.language and user.country . From what I can see en_GB will use the 24 hour clock.

If you want the small sample classes, I can mail you those, too.

Sorry it took a while (12 days), but I got the idea here after I was reading about the System class. Hopefully this is still useful! :-)

-- Helgi / Craig
This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

Profile

dcseain: Cast shot of me playing my violin in role of minstrel in the Two Gentlemen of Verona (Default)
dcseain

June 2013

S M T W T F S
      1
2345678
9101112131415
161718192021 22
23242526272829
30      

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jul. 1st, 2025 07:19 pm
Powered by Dreamwidth Studios