Ruby 【干货篇】你知道 Time#utc 会修改接受者吗?

mehdi-farsi · September 13, 2020 · 797 hits
# Ruby 2.7.1

time = Time.new

time     # => 2020-09-12 21:44:59.169696 +0200
time.utc # => 2020-09-12 19:44:59.169696 UTC 
time     # => 2020-09-12 19:44:59.169696 UTC
No Reply at the moment.
You need to Sign in before reply, if you don't have an account, please Sign up first.