summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Geshem.vue14
-rw-r--r--package.json21
-rw-r--r--yarn.lock8
3 files changed, 28 insertions, 15 deletions
diff --git a/Geshem.vue b/Geshem.vue
index 76b0605..b0feb52 100644
--- a/Geshem.vue
+++ b/Geshem.vue
@@ -14,6 +14,8 @@
import axios from 'axios';
import vueSlider from 'vue-slider-component';
import mapboxgl from 'mapbox-gl';
+ import moment from 'moment-timezone';
+
export default {
name: 'geshem',
components: {
@@ -52,15 +54,19 @@
}
},
computed: {
+ datetime: function () {
+ if (!this.imgs) { return '' };
+ var d = this.imgs[this.res][this.slider].substr(0, 13);
+ var md = moment.utc(d, 'YYYYMMDD/HHmm').tz('Asia/Jerusalem');
+ return md
+ },
date: function () {
if (!this.imgs) { return '' };
- var d = this.imgs[this.res][this.slider].substr(0, 8);
- return `${d.substr(6, 2)}-${d.substr(4, 2)}-${d.substr(0, 4)}`;
+ return this.datetime.format('YYYY-MM-DD');
},
time: function () {
if (!this.imgs) { return '' };
- var t = this.imgs[this.res][this.slider].substr(9, 6);
- return `${t.substr(0, 2)}:${t.substr(2, 2)}`;
+ return this.datetime.format('HH:mm');
}
},
mounted: function () {
diff --git a/package.json b/package.json
index c430998..1c2bacd 100644
--- a/package.json
+++ b/package.json
@@ -15,25 +15,26 @@
"dependencies": {
"aws-sdk": "^2.138.0",
"axios": "^0.16.2",
- "express": "^4.16.2",
- "mapbox-gl": "^0.40.1",
- "moment": "^2.19.1",
- "pug": "^2.0.0-rc.4",
- "redis": "^2.8.0",
- "request": "^2.83.0",
- "vue": "^2.4.4",
- "vue-slider-component": "^2.4.3",
- "webpack": "^3.8.1",
"babel-core": "^6.26.0",
"babel-loader": "^7.1.2",
"babel-preset-env": "^1.6.0",
"cross-env": "^5.0.5",
"css-loader": "^0.28.7",
+ "express": "^4.16.2",
"file-loader": "^1.1.5",
+ "mapbox-gl": "^0.40.1",
+ "moment": "^2.19.1",
+ "moment-timezone": "^0.5.13",
"node-sass": "^4.5.3",
+ "pug": "^2.0.0-rc.4",
+ "redis": "^2.8.0",
+ "request": "^2.83.0",
"sass-loader": "^6.0.6",
+ "vue": "^2.4.4",
"vue-loader": "^13.3.0",
- "vue-template-compiler": "^2.5.2"
+ "vue-slider-component": "^2.4.3",
+ "vue-template-compiler": "^2.5.2",
+ "webpack": "^3.8.1"
},
"private": false
}
diff --git a/yarn.lock b/yarn.lock
index a9ab950..b19e96a 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -3004,7 +3004,13 @@ mixin-object@^2.0.1:
dependencies:
minimist "0.0.8"
-moment@^2.19.1:
+moment-timezone@^0.5.13:
+ version "0.5.13"
+ resolved "https://registry.yarnpkg.com/moment-timezone/-/moment-timezone-0.5.13.tgz#99ce5c7d827262eb0f1f702044177f60745d7b90"
+ dependencies:
+ moment ">= 2.9.0"
+
+"moment@>= 2.9.0", moment@^2.19.1:
version "2.19.1"
resolved "https://registry.yarnpkg.com/moment/-/moment-2.19.1.tgz#56da1a2d1cbf01d38b7e1afc31c10bcfa1929167"