Re: UTC time with milliseconds
Re: UTC time with milliseconds
- Subject: Re: UTC time with milliseconds
- From: Shane Stanley <email@hidden>
- Date: Tue, 24 Feb 2015 10:00:25 +1100
On 24 Feb 2015, at 9:30 am, Shane Stanley <email@hidden> wrote:
You could always use ASObjC:
But let's get the script right. I forgot to set the time zone, and coerce the result to text:
use framework "Foundation"
set theNSDateFormatter to current application's NSDateFormatter's alloc()'s init() theNSDateFormatter's setDateFormat:"yyyy-MM-dd'T'HH:mm:ss.SSS" theNSDateFormatter's setTimeZone:(current application's NSTimeZone's timeZoneForSecondsFromGMT:0) return (theNSDateFormatter's stringFromDate:(current application's NSDate's |date|())) as text
|
_______________________________________________
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