Reputation: 12753
How do I get the number of milliseconds, in UTC time, since the epoch?
Just like myDate.getTime()
returns the milliseconds in local time, I need this in universal (UTC) time.
Any ideas?
Upvotes: 1
Views: 4605
Reputation: 1893
The ActionScript 2 Date object has a getTimezoneOffset method that will give you the difference between UTC and the local timezone in minutes.
var utc = myDate.getTime() + (myDate().getTimezoneOffset() * 60000);
Upvotes: 3