• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Change Unix Locale
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Change Unix Locale


  • Subject: Re: Change Unix Locale
  • From: Paul Berkowitz <email@hidden>
  • Date: Mon, 07 Apr 2003 00:59:01 -0700

I've had a confrimation fromthe user in France that all the Unix date
commands - which according to 'man srtftime' are menat to be "national
representations" are all resulting in the same US versions we get here. I
don't quite understand what is menat by "National".

%E* %O*
POSIX locale extensions. The sequences ì ì %Ex %EX %Ey %EY %Od
%Oe %OH %OI %Om %OM %OS %Ou %OU %OV %Ow %OW %Oy are supposed to
provide alternate representations.

Additionly ï implemented to represent short month name / day
order of the date, ï to represent long month name / day order and
%OB to represent alternative months names (used standalone, without
day mentioned).


> do shell script "date \"+ï %Y %T\""
>
RESULT:

"April 7 2003 08:36:55"



%x is replaced by national representation of the date.


> do shell script "date \"+%x %T\""

RESULT:

"04/07/03 08:41:40"


In France that should be "07/04/03".

I've asked him if he has a normal French OS. His Applescript 'date' command
is certainly expecting a French version and errors on "April 7" in a long
date.
>

--
Paul Berkowitz



> From: Paul Berkowitz <email@hidden>
> Date: Mon, 07 Apr 2003 07:34:04 +0200
> To: Applescript-Users <email@hidden>
> Subject: Change Unix Locale
>
> Does anyone know how to tell the Unix side of OS X that I'm in France, not
> the US? Changing Time Zone, Date and Time to French doesn't do it - it knows
> I'm really in teh US although itdoes change the date, time and time zone as
> requested. Here's why:
>
> A routine I have does 'do shell script "date"' in the format that's supposed
> to give the localized version in the localized month/day order:
>
>
> set theDate to do shell script "date \"+ï %Y %T\""
> set theDate to date theDate
>
> A user in France tells me that the script is erroring (or rather that it
> defaults to an 'on error' which does nothing - I'll remove that for the
> moment).
>
> It works perfectly fine here in the US, so I suspect that the date shell
> script isn't getting the result I'd expect and which would allow the second
> line to run on a French system, namely:
>
> "7 avril 2003 07:19:54"
>
> But when I try to test it here having set Date, Time and Time Zone to France
> (Paris), and Language and Numbers to French too for good measure, I get
>
> "April 7 2003 07:30:03"
>
> French time (and including time zone gets that correct too), but the English
> word for "April" and month before day instead of vice versa. It's just the
> same in the Terminal.
>
> Does anyone know how I tell my system that I'd like it to think it's in
> France? (Aside from offering it wine.)
>
>
> --
> Paul Berkowitz
> _______________________________________________
> applescript-users mailing list | email@hidden
> Help/Unsubscribe/Archives:
> http://www.lists.apple.com/mailman/listinfo/applescript-users
> Do not post admin requests to the list. They will be ignored.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

References: 
 >Change Unix Locale (From: Paul Berkowitz <email@hidden>)

  • Prev by Date: Re: Weird info for/choose file prompt issue
  • Next by Date: Re: Space in POSIX path/Terminal shell
  • Previous by thread: Change Unix Locale
  • Next by thread: Re: Change Unix Locale
  • Index(es):
    • Date
    • Thread