-format :: ZonedTime -> String
-format zonedTime
- = let localTime = zonedTimeToLocalTime zonedTime
- timeZone = zonedTimeZone zonedTime
- (year, month, day) = toGregorian (localDay localTime)
- (_, _, week) = toWeekDate (localDay localTime)
- timeOfDay = localTimeOfDay localTime
- in
- concat [ shortWeekDayName week
- , ", "
- , show2 day
- , " "
- , shortMonthName month
- , " "
- , show4 year
- , " "
- , show2 (todHour timeOfDay)
- , ":"
- , show2 (todMin timeOfDay)
- , ":"
- , show2 (floor (todSec timeOfDay))
- , " "
- , showRFC822TimeZone timeZone
- ]
+-- |Convert a 'ZonedTime' to RFC 1123 date and time string.
+toAscii ∷ ZonedTime → Ascii
+toAscii = A.fromAsciiBuilder ∘ toAsciiBuilder