Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

Use miliseconds for python buildDate

ZachTRice8f657b164c94
diff --git a/tasks/validateOptions.py b/tasks/validateOptions.py
index 0ad9f5f35..3dc433203 100755
--- a/tasks/validateOptions.py
+++ b/tasks/validateOptions.py
@@ -5,6 +5,7 @@ import json
from optparse import OptionParser
import os
import sys
+import time
from processTemporalLayer import process_temporal
prog = os.path.basename(__file__)
@@ -156,7 +157,7 @@ for startingLayer in wv["defaults"]["startingLayers"]:
else:
startingLayers += [startingLayer]
wv["defaults"]["startingLayers"] = startingLayers
-wv["buildDate"] = datetime.utcnow().isoformat(" ")
+wv["buildDate"] = int(round(time.time() * 1000))
for projection, projectionValue in wv["naturalEvents"]["layers"].iteritems():
for eventType, eventTypeLayerList in projectionValue.iteritems():
diff --git a/web/js/tour/ui.js b/web/js/tour/ui.js
index 0f413c1df..81649ea08 100644
--- a/web/js/tour/ui.js
+++ b/web/js/tour/ui.js
@@ -84,21 +84,17 @@ export function tourUi(models, ui, config) {
}
if (hideTour && config.buildDate) {
- let buildDate = new Date(config.buildDate);
- let buildDateUTC = Date.UTC(buildDate.getUTCFullYear(), buildDate.getUTCMonth(),
- buildDate.getUTCDate(), buildDate.getUTCHours(),
- buildDate.getUTCMinutes(), buildDate.getUTCSeconds());
-
// Tour hidden when visiting fresh URL
googleTagManager.pushEvent({
'event': 'tour_start_hidden',
- 'buildDate': buildDateUTC,
+ 'buildDate': config.buildDate,
'tourDate': hideTour
});
console.log('config.buildDate', config.buildDate);
- console.log('buildDateUTC', buildDateUTC);
+ // console.log('buildDate', buildDate)
+ // console.log('buildDateUTC', buildDateUTC);
console.log('hideTour', hideTour);
- if (buildDateUTC > hideTour) {
+ if (config.buildDate > hideTour) {
localStorage.removeItem('hideTour');
return true;
} else {