diff --git a/ginger.cabal b/ginger.cabal
--- a/ginger.cabal
+++ b/ginger.cabal
@@ -2,7 +2,7 @@
 -- documentation, see http://haskell.org/cabal/users-guide/
 
 name:                ginger
-version:             0.10.0.5
+version:             0.10.1.0
 synopsis:            An implementation of the Jinja2 template language in Haskell
 description:         Ginger is Jinja, minus the most blatant pythonisms. Wants
                      to be feature complete, but isn't quite there yet.
@@ -72,7 +72,7 @@
                  , aeson >=1.4.2.0 && <1.6
                  , bytestring >=0.10.8.2 && <0.11
                  , data-default >= 0.5
-                 , optparse-applicative >=0.14.3.0 && <0.16
+                 , optparse-applicative >=0.14.3.0 && <0.17
                  , process >=1.6.5.0 && <1.7
                  , text >=1.2.3.1 && <1.3
                  , transformers >=0.5.6.2 && <0.6
diff --git a/src/Text/Ginger/Run/Builtins.hs b/src/Text/Ginger/Run/Builtins.hs
--- a/src/Text/Ginger/Run/Builtins.hs
+++ b/src/Text/Ginger/Run/Builtins.hs
@@ -652,10 +652,10 @@
             lt <- parseTimeM True defaultTimeLocale fmt input
             return $ ZonedTime lt defTZ
         formats =
-            [ (ztparse, "%Y-%m-%dT%H:%M:%S%Z")
-            , (utcparse, "%Y-%m-%d %H:%M:%S")
-            , (ztparse, "%Y-%m-%d %H:%M:%S%z")
-            , (ztparse, "%Y-%m-%d %H:%M:%S%Z")
+            [ (ztparse, "%Y-%m-%dT%H:%M:%S%Q%Z")
+            , (utcparse, "%Y-%m-%d %H:%M:%S%Q")
+            , (ztparse, "%Y-%m-%d %H:%M:%S%Q%z")
+            , (ztparse, "%Y-%m-%d %H:%M:%S%Q%Z")
             , (utcparse, "%Y-%m-%d")
             ]
 
diff --git a/test/Text/Ginger/SimulationTests.hs b/test/Text/Ginger/SimulationTests.hs
--- a/test/Text/Ginger/SimulationTests.hs
+++ b/test/Text/Ginger/SimulationTests.hs
@@ -549,6 +549,22 @@
                 mkTestHtml [] []
                     "{{ '2015-06-13T12:05:43Z'|date('%Y-%m-%d %H:%M:%S') }}"
                     "2015-06-13 12:05:43"
+            , testCase "format a string with fractional seconds as a date (all variants)" $ do
+                mkTestHtml [] []
+                    "{{ '2015-06-13T12:05:43.271828Z'|date('%Y-%m-%d %H:%M:%S%Q') }}"
+                    "2015-06-13 12:05:43.271828"
+                mkTestHtml [] []
+                    "{{ '2015-06-13 12:05:43.271828'|date('%Y-%m-%d %H:%M:%S%Q') }}"
+                    "2015-06-13 12:05:43.271828"
+                mkTestHtml [] []
+                    "{{ '2015-06-13 12:05:43.271828z'|date('%Y-%m-%d %H:%M:%S%Q') }}"
+                    "2015-06-13 12:05:43.271828"
+                mkTestHtml [] []
+                    "{{ '2015-06-13 12:05:43.271828Z'|date('%Y-%m-%d %H:%M:%S%Q') }}"
+                    "2015-06-13 12:05:43.271828"
+                mkTestHtml [] []
+                    "{{ '2015-06-13 12:05:43.271828+0200'|date('%Y-%m-%d %H:%M:%S%Q%z') }}"
+                    "2015-06-13 12:05:43.271828+0200"
             , testCase "format a string as a time-of-day" $ do
                 mkTestHtml [] []
                     "{{ '2015-06-13 12:05:43'|date('%H-%M-%S') }}"
