views:

39

answers:

1

If I call new Date() it will get the current time for the machine my app is running on.

I'm assuming that the machines on the Google App Engine do not all have their time synchronized.

Is there a way to get a time that would be consistent across instances of my app that may be running on different machines?

+1  A: 

No. Machines are NTP synchronized, so they will be within a few milliseconds of each other, but there's no way to get a global monotonic counter on App Engine. This is because the only way to do so requires a single authority, and is thus not a scalable solution.

Nick Johnson