packages feed

time 1.8.0.1 → 1.8.0.2

raw patch · 6 files changed

+13/−8 lines, 6 files

Files

changelog.md view
@@ -1,5 +1,8 @@ # Change Log +## [1.8.0.2]+- Fix behaviour of %Q in format+ ## [1.8.0.1] - Get building on 32 bit machine 
configure.ac view
@@ -1,4 +1,4 @@-AC_INIT([Haskell time package], [1.8.0.1], [ashley@semantic.org], [time])+AC_INIT([Haskell time package], [1.8.0.2], [ashley@semantic.org], [time])  # Safety check: Ensure that we are in the correct source directory. AC_CONFIG_SRCDIR([lib/include/HsTime.h])
lib/Data/Time/Clock/Internal/SystemTime.hs view
@@ -19,7 +19,7 @@  #ifdef mingw32_HOST_OS import qualified System.Win32.Time as Win32-#elif HAVE_CLOCK_GETTIME+#elif defined(HAVE_CLOCK_GETTIME) import Data.Time.Clock.Internal.CTimespec import Foreign.C.Types (CTime(..), CLong(..)) #else@@ -67,7 +67,7 @@ getTime_resolution = 100E-9 -- 100ns getTAISystemTime = Nothing -#elif HAVE_CLOCK_GETTIME+#elif defined(HAVE_CLOCK_GETTIME) -- Use hi-res clock_gettime  timespecToSystemTime :: CTimespec -> SystemTime
lib/Data/Time/Format.hs view
@@ -143,7 +143,7 @@ -- [@%q@] picosecond of second, 0-padded to twelve chars, @000000000000@ - @999999999999@. -- -- [@%Q@] decimal point and fraction of second, up to 12 second decimals, without trailing zeros.--- For a whole number of seconds, @%Q@ produces the empty string.+-- For a whole number of seconds, @%Q@ omits the decimal point unless padding is specified. -- -- === 'UTCTime' and 'ZonedTime' -- For 'UTCTime' and 'ZonedTime':@@ -275,7 +275,9 @@     -- Second     formatCharacter 'S' = Just $ padNum True  2 '0' $ (floor . todSec :: TimeOfDay -> Int)     formatCharacter 'q' = Just $ padGeneral True True 12 '0' $ \_ pado -> showPaddedFixedFraction pado . todSec-    formatCharacter 'Q' = Just $ padGeneral True False 12 '0' $ \_ pado -> ('.':) . showPaddedFixedFraction pado . todSec+    formatCharacter 'Q' = Just $ padGeneral True False 12 '0' $ \_ pado -> dotNonEmpty . showPaddedFixedFraction pado . todSec where+        dotNonEmpty "" = ""+        dotNonEmpty s = '.':s      -- Default     formatCharacter _   = Nothing
test/unix/Test/Format/Format.hs view
@@ -190,13 +190,13 @@     formatUnitTest "%-5q" 0 "     ",     formatUnitTest "%-5q" 0.37 "37   ", -    formatUnitTest "%Q" 0 ".",+    formatUnitTest "%Q" 0 "",     formatUnitTest "%Q" 0.37 ".37",     formatUnitTest "%0Q" 0 ".000000000000",     formatUnitTest "%0Q" 0.37 ".370000000000",     formatUnitTest "%_Q" 0 ".            ",     formatUnitTest "%_Q" 0.37 ".37          ",-    formatUnitTest "%-Q" 0 ".",+    formatUnitTest "%-Q" 0 "",     formatUnitTest "%-Q" 0.37 ".37",     formatUnitTest "%1Q" 0 ".0",     formatUnitTest "%1Q" 0.37 ".3",
time.cabal view
@@ -1,5 +1,5 @@ name:           time-version:        1.8.0.1+version:        1.8.0.2 stability:      stable license:        BSD3 license-file:   LICENSE