From 63cdd94a3b22152f7ee89b468ba047b10d5038fe Mon Sep 17 00:00:00 2001
From: Tristan Cavelier <tristan.cavelier@tiolive.com>
Date: Fri, 21 Feb 2014 10:00:56 +0100
Subject: [PATCH] metadata.rst w3c get date function updated

---
 docs/metadata.rst | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/docs/metadata.rst b/docs/metadata.rst
index b049623..620d4ae 100644
--- a/docs/metadata.rst
+++ b/docs/metadata.rst
@@ -437,7 +437,7 @@ W3C Date function
    */
   function getW3CDate(use_utc) {
     var d = new Date(), offset;
-    if (use_utc === true) {
+    if (use_utc) {
       return d.toISOString();
     }
     offset = - d.getTimezoneOffset();
@@ -449,9 +449,9 @@ W3C Date function
         d.getMinutes() + ":" +
         d.getSeconds() + "." +
         d.getMilliseconds() +
-        (offset < 0 ? "-" : "+") +
-        (offset / 60) + ":" +
-        (offset % 60)
+        (offset < 0 ?
+         "-" + parseInt(-offset / 60, 10) + ":" + (-offset % 60) :
+         "+" + parseInt(offset / 60, 10) + ":" + (offset % 60))
     ).replace(/[0-9]+/g, function (found) {
       if (found.length < 2) {
         return '0' + found;
-- 
2.30.9