Is it possible to get UTC (universal time) on a Mac with script?

G’day

I’d really like to date stamp a heap of saved mail files with UTC instead of local time.

Unfortunately Macs can’t be set to UTC, which is a pain.

Anybody know of a way of getting UTC in a script?

Regards

Santa

Model: G5 1.8 GHz
AppleScript: 2.1.1
Browser: Safari 419.3
Operating System: Mac OS X (10.4)

Hi Santa,

do you mean this?

set UTC to (current date) - (time to GMT)

G’day Stefan

Will that return UTC even if daylight saving is in effect?

It’s so darn simple!!

Thanks, & regards

Santa

I think so,
I ran the script several times after changing the time zone in System Preferences and got always the same result.
A shell alternative is

do shell script "date -u"

Good on yer mate!

which is Oz speak for ‘Thank you very much my friend!’ :smiley: