开发者

Google App Engine - Is there a way to get some sort of current time that would be consistent across instances of my app

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 mach开发者_如何学Goines?


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜