阅读背景:

如何在rails上将服务器时间更改为客户端时间?

来源:互联网 

So my end goal is to have Heroku server's Time.now to be same as the time that you do new Date.now() from JavaScript. What I have done so far is catching the timezone offset from JavaScript, and set Time.zone on Rails with the appropriate client timezone, so now, Time.zone is the right time zone. But however, Time.now is still reflecting the real timezone instead of the one feeding into Time.zone. I guess that's not what I suppose to do at the first place.So my end goal is to have Heroku server's Time.




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: