method

rfc3339

v2_2_9 - Show latest stable - Class: DateTime
rfc3339(*args)
public

This method is equivalent to strftime(ā€˜%FT%T%:z’). The optional argument n is the number of digits for fractional seconds.

DateTime.parse('2001-02-03T04:05:06.123456789+07:00').rfc3339(9)
                          #=> "2001-02-03T04:05:06.123456789+07:00"