Flowdock
method

formatted_offset

Importance_1
v2.1.0 - Show latest stable - 0 notes - Class: ActiveSupport::CoreExtensions::DateTime::Conversions
formatted_offset(colon = true, alternate_utc_string = nil) public

Returns the utc_offset as an +HH:MM formatted string. Examples:

  datetime = DateTime.civil(2000, 1, 1, 0, 0, 0, Rational(-6, 24))
  datetime.formatted_offset         # => "-06:00"
  datetime.formatted_offset(false)  # => "-0600"
Show source
Register or log in to add new notes.