DateTime offset : DateTime « Date « Ruby
- Ruby
- Date
- DateTime
DateTime offset
require 'date'
now = DateTime.now
now.to_s
now.new_offset.to_s
# The original object was not affected by the time zone conversion.
puts now.to_s
Related examples in the same category