Re: Time & Date Preferences?
Re: Time & Date Preferences?
- Subject: Re: Time & Date Preferences?
- From: Andreas Mayer <email@hidden>
- Date: Mon, 2 Jun 2003 19:46:59 +0200
Am Montag, 02.06.03 um 18:29 Uhr schrieb Jonathan E. Jackel:
It seems that you have to read those docs really carefully in this
case.
As a lawyer by training, I think the following makes a certain amount
of
sense. I suspect that's why so many normal people are fooled ;/.
Well, not only I am not a lawyer, but I'm not a native English speaker
also ... :)
But that does not change the settings for the
"locale" of the United States, which seems to be what you get with %x
(if I
remember it correctly).
So the default locale is _always_ US english? I think it really should
default to the systems settings.
Anyway. If I wanted to change the locale, I would use [NSUserDefaults
standardUserDefaults] as the 'locale dictionary', right?
But
[[NSCalendarDate calendarDate] descriptionWithCalendarFormat:@"%x"
locale:[NSUserDefaults standardUserDefaults]]
gives me
"Montag, Juni 02, 2003 19:27:13 Europe/Zurich"
(as does "%X"!)
That's broken in two ways.
First, [[NSUserDefaults standardUserDefaults]
stringForKey:NSTimeDateFormatString] apparently is "%A, %B %d, %Y
%H:%M:%S %Z" which is not quite, what we use in Germany. (Should be
"%A, %e. %B %Y, %H:%M:%S %Z".)
(NSTimeFormatString and NSDateFormatString on the other hand, evaluate
to "%H:%M:%S" and "%A, %e. %B %Y" respectively, which matches what I
did select in the System Prefs.)
Second, "%x" should give me the "date using the date representation for
the locale" and "%X" the "time using the time representation for the
locale". What I get here is what I would have expected from "%c"
("shorthand for %X %x, the locale format for date and time").
Seems like the date and time formatting is still broken somehow.
bye. Andreas.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.