You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by be...@apache.org on 2012/04/05 23:12:13 UTC

git commit: Fixes CB-439 - Compass timestamp should be milliseconds

Updated Branches:
  refs/heads/master 4049fa200 -> 86e93225c


Fixes CB-439 - Compass timestamp should be milliseconds

modified CompassHeading so that timestamp is set in milliseconds


Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/commit/86e93225
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/tree/86e93225
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/diff/86e93225

Branch: refs/heads/master
Commit: 86e93225ccb258c9e18c1278eb0f0b8afc70b00b
Parents: 4049fa2
Author: Becky Gibson <be...@apache.org>
Authored: Wed Apr 4 14:37:29 2012 -0400
Committer: Becky Gibson <be...@apache.org>
Committed: Thu Apr 5 17:10:49 2012 -0400

----------------------------------------------------------------------
 lib/common/plugin/CompassHeading.js |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/86e93225/lib/common/plugin/CompassHeading.js
----------------------------------------------------------------------
diff --git a/lib/common/plugin/CompassHeading.js b/lib/common/plugin/CompassHeading.js
index 2336beb..77bd465 100644
--- a/lib/common/plugin/CompassHeading.js
+++ b/lib/common/plugin/CompassHeading.js
@@ -2,7 +2,7 @@ var CompassHeading = function(magneticHeading, trueHeading, headingAccuracy, tim
   this.magneticHeading = (magneticHeading !== undefined ? magneticHeading : null);
   this.trueHeading = (trueHeading !== undefined ? trueHeading : null);
   this.headingAccuracy = (headingAccuracy !== undefined ? headingAccuracy : null);
-  this.timestamp = (timestamp !== undefined ? new Date(timestamp) : new Date());
+  this.timestamp = (timestamp !== undefined ? timestamp : new Date().getTime());
 };
 
 module.exports = CompassHeading;