-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/

-- | Compatibility with old-time for the time package
--   
--   Compatibility with the old-time package for the "new"
--   time package.
@package time-compat
@version 0.1.0.1

-- | Compatibility with the
--   http://hackage.haskell.org/package/old-time package for the
--   "new" http://hackage.haskell.org/package/time package.
--   
--   This is useful for writing portable code; in particular, if you're
--   using the http://hackage.haskell.org/package/directory package
--   and you want your code to build with both GHC 7.6 and earlier
--   versions. The version of directory used with GHC 7.6 changed
--   a dependency from old-time to time which means its
--   getModificationTime function now returns a UTCTime
--   instead of a ClockTime. This type affects the public API of
--   many libraries that use it. To make such libraries portable, port your
--   code to use the time package and to only rely on
--   UTCTime in its public API, and call toUTCTime on the
--   values returned by functions like getModificationTime, for
--   example:
--   
--   
--   fmap toUTCTime getModificationTime
--   
--   
--   If you're using directory-1.2, toUTCTime will just be
--   id and the original value is returned intact. If you're using
--   an older directory, for example because you're building with
--   GHC 7.4, the ClockTime returned by getModificationTime
--   will be converted to a UTCTime and will be compatible with your
--   code ported to the new time package.
module Data.Time.Compat
class ToUTCTime a
toUTCTime :: ToUTCTime a => a -> UTCTime
instance ToUTCTime CalendarTime
instance ToUTCTime ClockTime
instance ToUTCTime UTCTime
