summaryrefslogtreecommitdiff
path: root/www/js/clock.js
diff options
context:
space:
mode:
Diffstat (limited to 'www/js/clock.js')
-rw-r--r--www/js/clock.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/www/js/clock.js b/www/js/clock.js
index 3fa5c24..722a979 100644
--- a/www/js/clock.js
+++ b/www/js/clock.js
@@ -29,6 +29,10 @@ function Clock() {
this.clock_rtt = 0;
this.state = 'NEW';
+ this.now = function() {
+ return new Date(this.getRDTimeMS());
+ }
+
this.getRDTimeMS = function() {
return (+new Date()) + (this.last_message.tz_offset * 1000) + this.clock_offset;
}