Thanks a lot Michelle.
It's exactly what I needed.
--{code}
tell application "Numbers" to tell document 1 to tell sheet 1 to tell table 1
tell cell "B16"
set maybe to value
set maybef to format
end tell
if class of maybe is date then
set maybe2 to maybe - (my time_to_GMT_without_DST())
set maybe3 to date string of maybe
end if
tell cell "D14"
set value to (maybe as text)
set format to maybef
end tell
if class of maybe is date then
tell cell "D15"
set value to (maybe2 as text)
set format to maybef
end tell
tell cell "D16"
set value to (maybe3 as text)
set format to maybef
end tell
end if
end tell
on time_to_GMT_without_DST()
if last word of (do shell script "zdump `date +\"%Z\"`") = "UTC" then
return (time to GMT) - 3600
else
return time to GMT
end if
end time_to_GMT_without_DST
--{code}
--{code}
tell application "Numbers" to tell document 1 to tell sheet 1 to tell table 1
tell cell "B16"
set {maybe, maybef} to {value, format}
end tell
if class of maybe is date then
set maybe to maybe - (my time_to_GMT_without_DST())
end if
tell cell "D14"
set {value, format} to {maybe as text, maybef}
end tell
end tell
on time_to_GMT_without_DST()
if last word of (do shell script "zdump `date +\"%Z\"`") = "UTC" then
return (time to GMT) - 3600
else
return time to GMT
end if
end time_to_GMT_without_DST
--{code}
Yvan KOENIG (VALLAURIS, France) dimanche 10 juillet 2011 16:40:22