Re: My script won't be running stably
Re: My script won't be running stably
- Subject: Re: My script won't be running stably
- From: Yvan KOENIG <email@hidden>
- Date: Thu, 23 Mar 2017 13:17:19 +0100
It would be fine to replace :
set locale_Date to date requested_date set short_date to short date string of result set time_string to time string of locale_Date set Unix_day to text 1 thru 2 of short_date set Unix_month to text 4 thru 5 of short_date set Unix_year to text 7 thru 8 of short_date
by
set locale_Date to date requested_date set timeSring to time string of locale_Date set Unix_day to text -2 thru -1 of ((100 + (day of locale_Date)) as string) set Unix_month to text -2 thru -1 of ((100 + (month of locale_Date)) as string) set Unix_year to text -2 thru -1 of (year of locale_Date as string)
This way your code will not be dependent of the local settings.
Yvan KOENIG running Sierra 10.12.3 in French (VALLAURIS, France) jeudi 23 mars 2017 13:17:15
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden