method
to_s
v1_9_1_378 -
Show latest stable
- Class:
DateTime
to_s()public
No documentation available.
# File lib/date.rb, line 1759
def to_s # 4p
format('%.4d-%02d-%02dT%02d:%02d:%02d%s',
year, mon, mday, hour, min, sec, zone)
end 1Note
Output format
This outputs date & time in format of +yyyy-MM-ddThh-mm-ssZZZ+. All values are preceded with +0+ if less than +10+. Hours are in +0..23+ range. Timezone is sticked at the end. Watch out for capital +T+ in the middle :)