From 9a559809b027fc214090a70540e922325a8af8f5 Mon Sep 17 00:00:00 2001 From: rolux Date: Sat, 25 Feb 2012 13:04:18 +0530 Subject: [PATCH] make Ox.getTime accept utc parameter --- source/Ox/js/Date.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/source/Ox/js/Date.js b/source/Ox/js/Date.js index a56fd337..7edddafb 100644 --- a/source/Ox/js/Date.js +++ b/source/Ox/js/Date.js @@ -179,10 +179,9 @@ Ox.getISOYear = function(date, utc) { //@ Ox.getSeconds Get the seconds of a date // see Ox.setSeconds for source code -//@ Ox.getTime Alias for +new Date() (deprecated) -Ox.getTime = function() { - // fixme: needed? - return +new Date(); +//@ Ox.getTime Alias for +new Date() +Ox.getTime = function(utc) { + return +new Date() - (utc ? Ox.getTimezoneOffset() : 0); }; /*@