Google App引擎上的UTC时间? [英] UTC Time on Google App engine?
问题描述
如果我调用System.currentTimeMillis()并存储该信息,那么当我的servlet在谷歌应用程序引擎中被击中时,什么是最好的方法?它可靠吗?
我不需要几毫秒的精度。
我只想在实体上存储日期它到达。
谢谢
不,它不可靠。
在Dan Sanderson的编程Google App Engine一书中,他说:
值得注意的是,App Engine不保证所有Web服务器的系统
时钟都是同步的。 < ...>服务器时钟
与现实世界应用程序的时间数据源
不够一致,但对于此示例而言,它足够好。
What's the best way to work out the time when my servlet in google app engine is hit ?
if I call System.currentTimeMillis() and store that info will it be reliable ?
I don't need milliseconds precision.
I just want to store an entity with the date on when it arrives.
Thanks
No, it won't be reliable.
In Dan Sanderson's book, "Programming Google App Engine" he says:
It's worth noting that App Engine makes no guarantees that the system clocks of all of its web servers are synchronized. <...> The server clock is not consistent enough as a source of time data for a real-world application, but it's good enough for this example.
这篇关于Google App引擎上的UTC时间?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!