新手问题 一行代码获取伦敦时间明天上午 11 点整的时间戳?

perrywky · January 02, 2014 · Last by perrywky replied at January 02, 2014 · 2272 hits

求高手指点!

先说个我自己的吧 Date.today.next.to_time + 39600 + Time.now.utc_offset 39600 = 60*60*11

#1 楼 @perrywky 是指北京时间明天 11 点对应的伦敦时间?

Date.tomorrow.to_time.change(hour: 11).in_time_zone("London")

#2 楼 @santochancf 是伦敦时间 11 点,你这个需要 rails 吧?

You need to Sign in before reply, if you don't have an account, please Sign up first.