Behavior of hard-coded date in AppleScript
This works for me using the latest version of Sierra
--property the_date : current date
property the_date : date ("Sunday, May 31, 2009 at 4:00:00PM")
property the_year : year of the_date
property the_day : day of the_date
property the_month : month of the_date
property the_hours : hours of the_date
property the_minutes : minutes of the_date
property the_seconds : seconds of the_date
property shortDateString : missing value
make_date(the_year, the_month, the_day, the_hours, the_minutes, the_seconds)
set shortDateString to short date string of the_date
set timeString to time string of the_date
set systemDate to date string of date shortDateString
log timeString
log shortDateString
log systemDate
on make_date(the_year, the_month, the_day, the_hours, the_minutes, the_seconds)
--set the_date to current date
set year of the_date to the_year
set day of the_date to 1
set month of the_date to the_month
set day of the_date to the_day
set hours of the_date to the_hours
set minutes of the_date to the_minutes
set seconds of the_date to the_seconds
return the_date
end make_date
In this script, I set a predetermined date value as a variable. With my region set up to United States, in system preferences, I ran the script and logged the results. The first three lines of the results in the following image, were the values returned with my system set to United States region. Next I went back to system preferences and switched my region to Hungary and ran the script again. The last three lines of the results in the image, reflect the date and time values as if I was on a computer in Europe (Hungary)