#5970: Applications do not know if 24-hour clock is in use ------------------------------------------+--------------------------------- Reporter: Karvjorm | Owner: pulkomandy Type: bug | Status: assigned Priority: normal | Milestone: R1 Component: System | Version: R1/alpha2 Keywords: 24-hour clock Country Locale | Blockedby: Patch: 0 | Platform: All Blocking: | ------------------------------------------+--------------------------------- Comment(by Karvjorm): Replying to [comment:3 pulkomandy]: > I don't understand the use of the "encoding" part of the patch, since everything in Haiku is using utf-8. > Oops. Does that mean that utf-8 is mandatory for all locale settings in Haiku? In linux I have used to define for example "export LANG=fi_FI@ISO-8859-15" and when I download an ISO-8859-15 encoded html page from web, I can open a terminal window and write there "nano index.html". Then nano opens with Finnish menu items and html page opens with correct character forms. No need to convert characters to utf-8, for example. Then I can edit html page and upload it back to my web server. > As for dstcheck, one should use the formatter in BCountry, not strftime. See the deskbar code for the proper way to do it. This is because we need something more flexible, look at what happens if you select an arabic language in the preflet, for example. The ":" character isn't even used, and strftime can't handle such things. > The orginal code is: strftime(timestring, 15, "%I:%M %p", &tm); Here "%I" and "%p" are problems. In my patch I only "quessed" some solution to solve this "%I" and "%p" problem. You can simply forget my patches. > Also, as ICU is handling most of the backend stuff, you don't need to store the fact that the clock is 24 hours, and you don't even have to decide if the clock is 12 or 24 hours. What if some country decides to use a 30-hour day or something else ? Let ICU handle that, they know better than us :) If ICU provides some means to handle this, please, use it. In my patches I mixed this "%I, %p" problem (due to 12/24 hour clock) and localization of text to the same ticket. It is my mistake. I should have done only localization patch in one ticket and guessed some solution for 12/24 hour and encoding in another tickets. -- Ticket URL: <http://dev.haiku-os.org/ticket/5970#comment:4> Haiku <http://dev.haiku-os.org> Haiku - the operating system.