We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Time#to_s
1 parent 43c7dfc commit fdb1e71Copy full SHA for fdb1e71
src/time.cr
@@ -1112,11 +1112,15 @@ struct Time
1112
# When the location is `UTC`, the offset is replaced with the string `UTC`.
1113
# Offset seconds are omitted if `0`.
1114
def to_s(io : IO) : Nil
1115
- to_s(io, "%F %T ")
+ formatter = Format::Formatter.new(self, io)
1116
+ formatter.year_month_day
1117
+ io << " "
1118
+ formatter.twenty_four_hour_time_with_seconds
1119
1120
if utc?
- io << "UTC"
1121
+ io << " UTC"
1122
else
1123
1124
zone.format(io)
1125
end
1126
0 commit comments