timeOfDay = localTimeOfDay localTime
(secInt, secFrac) = properFraction (todSec timeOfDay)
in
- (printf "%04d-%02d-%02dT%02d:%02d:%02d"
- year
- month
- day
- (todHour timeOfDay)
- (todMin timeOfDay)
- (secInt :: Int))
+ printf "%04d-%02d-%02dT%02d:%02d:%02d"
+ year
+ month
+ day
+ (todHour timeOfDay)
+ (todMin timeOfDay)
+ (secInt :: Int))
++
(if secFrac == 0
then ""
formatTimeZone :: TimeZone -> String
formatTimeZone tz
= case timeZoneMinutes tz of
- offset | offset < 0 -> '-':(showTZ $ negate offset)
+ offset | offset < 0 -> '-' : (showTZ $ negate offset)
| offset == 0 -> "Z"
- | otherwise -> '+':(showTZ offset)
+ | otherwise -> '+' : showTZ offset
showTZ :: Int -> String
showTZ offset
show2 hour ++ ":" ++ show2 minute
show2 :: Int -> String
- show2 n | n < 10 = '0':(show n)
+ show2 n | n < 10 = '0' : show n
| otherwise = show n