Skip to content

Data.Time.formatTime "%S" includes fractional seconds

from the Haddock: %S second, without decimal part, 00 - 60

Prelude Locale Data.Time> getZonedTime >>= return . formatTime defaultTimeLocale "%S" Loading package time-1.0 ... linking ... done. "32.332216"

Shouldn't that return just "32" ? Or is there another way of stripping the decimals?

Tested on Ubuntu Feisty Fawn and ghc 6.6

% ghc-pkg list time /usr/lib/ghc-6.6/package.conf:

time-1.0

Trac metadata
Trac field Value
Version 6.6.1
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component libraries (other)
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system Unknown
Architecture Unknown
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information