diff --git a/Changelog.md b/Changelog.md
--- a/Changelog.md
+++ b/Changelog.md
@@ -1,3 +1,8 @@
+### 0.4.8.0
+
+- Correct implementation of *Eq* and *Ord* instances for *TimeInterval*.
+- A new value *Unset* equal to *Sec 0* added in *TimeInterval*.
+
 ### 0.4.7.0
 
 - Derive *TimeInterval* from *Eq*.
diff --git a/NgxExport/Tools.hs b/NgxExport/Tools.hs
--- a/NgxExport/Tools.hs
+++ b/NgxExport/Tools.hs
@@ -68,6 +68,8 @@
 import           Data.IORef
 import           Data.Maybe
 import           Data.Aeson
+import           Data.Function (on)
+import           Data.Ord (comparing)
 import           Control.Monad
 import           Control.Arrow
 import           Control.Exception
@@ -145,9 +147,17 @@
                   | Sec Int         -- ^ Seconds
                   | HrMin Int Int   -- ^ Hours and minutes
                   | MinSec Int Int  -- ^ Minutes and seconds
-                  deriving (Generic, Lift, Read, Show, Eq)
+                  | Unset           -- ^ Zero time interval, equal to @Sec 0@
+                  deriving (Generic, Lift, Read, Show)
+
 instance FromJSON TimeInterval
 
+instance Eq TimeInterval where
+    (==) = (==) `on` toSec
+
+instance Ord TimeInterval where
+    compare = comparing toSec
+
 -- | Converts a time interval into seconds.
 toSec :: TimeInterval -> Int
 toSec (Hr h)       = 3600 * h
@@ -155,8 +165,9 @@
 toSec (Sec s)      = s
 toSec (HrMin h m)  = 3600 * h + 60 * m
 toSec (MinSec m s) = 60 * m + s
+toSec Unset        = 0
 
--- | Delays the current thread for the specified number of seconds.
+-- | Delays the current thread by the specified number of seconds.
 threadDelaySec :: Int -> IO ()
 threadDelaySec = threadDelay . (* 1e6)
 
diff --git a/ngx-export-tools.cabal b/ngx-export-tools.cabal
--- a/ngx-export-tools.cabal
+++ b/ngx-export-tools.cabal
@@ -1,5 +1,5 @@
 name:                       ngx-export-tools
-version:                    0.4.7.0
+version:                    0.4.8.0
 synopsis:                   Extra tools for Nginx haskell module
 description:                Extra tools for
         <http://github.com/lyokha/nginx-haskell-module Nginx haskell module>.
