Is it safe to compare JavaScript's getTime() across different systems?

JavaScript's getTime() returns "the number of milliseconds since 1 January 1970 00:00:00 UTC".

Can I rely on this being similar across different machines? I don't need it to be accurate to the millisecond, just to a few seconds.

Or do I need to use an external time service API, as in this question?

Where does JavaScript get the current time from - is it dependent on the machine's clock?

Answers


Can I rely on this being similar across different machines?

No.

Where does JavaScript get the current time from

The system datetime on which this javascript runs.

Or do I need to use an external time service API, as in this question?

You could use the server's time and send it to the client.


Need Your Help

How can I modify Windows NTFS permissions in Perl?

perl winapi permissions

I'm using ActiveState Perl on Windows Server 2003.

php destroy a session which is not the current session

php session

If a user opens a session, I would like to destroy all other sessions that he might have.

Declare a service(to be private) in android

android service android-manifest

How would it be possible to create a private service? i mean my custom service should not be accessible by other applications? What parameters i should define in AndroidManifext.XML?

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.