Explorar el Código

Fix issue when passing data in milliseconds

Sebastián Katzer hace 10 años
padre
commit
82fc1dfb25
Se han modificado 1 ficheros con 3 adiciones y 1 borrados
  1. 3 1
      www/local-notification-util.js

+ 3 - 1
www/local-notification-util.js

@@ -153,9 +153,11 @@ exports.convertProperties = function (options) {
     }
 
     if (typeof options.at == 'object') {
-        options.at = Math.round(options.at.getTime()/1000);
+        options.at = options.at.getTime();
     }
 
+    options.at = Math.round(options.at/1000);
+
     if (typeof options.data == 'object') {
         options.data = JSON.stringify(options.data);
     }