LoginSignup
0
0

More than 5 years have passed since last update.

TimeWithZone とDateTimeのiso8601で少し形式が違う

Last updated at Posted at 2016-07-08

TimeWithZoneとDateTimeのiso8601の形式が若干異なりはまったのでメモ

[1] pry(main)> Time.zone.now.utc.iso8601
=> "2016-07-08T14:18:51Z"
[2] pry(main)> DateTime.now.utc.iso8601
=> "2016-07-08T14:19:03+00:00"

TimeWithZoneのほうは語尾が"Z"で
DateTimeのほうは語尾が"+00:00"です

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0