Selaa lähdekoodia

timeZone set to UTC

tags/0.9.0
Alej 4 vuotta sitten
vanhempi
commit
315ee72ac1

+ 1
- 1
vue-theme/src/components/sidebars/events.vue Näytä tiedosto

33
     methods: {
33
     methods: {
34
         dateFrom(unix, includeTime) {
34
         dateFrom(unix, includeTime) {
35
             const d = new Date(parseInt(unix) * 1000)
35
             const d = new Date(parseInt(unix) * 1000)
36
-            return includeTime ? d.toLocaleString('en-US') : d.toLocaleDateString('en-US')
36
+            return includeTime ? d.toLocaleString('en-US', { timeZone: 'UTC' }) : d.toLocaleDateString('en-US')
37
         },
37
         },
38
         async getPosts() {
38
         async getPosts() {
39
             this.$store.commit('CLEAR_EVENTS')
39
             this.$store.commit('CLEAR_EVENTS')

+ 1
- 1
vue-theme/src/components/sidebars/exhibitions.vue Näytä tiedosto

33
     methods: {
33
     methods: {
34
         dateFrom(unix, includeTime) {
34
         dateFrom(unix, includeTime) {
35
             const d = new Date(parseInt(unix) * 1000)
35
             const d = new Date(parseInt(unix) * 1000)
36
-            return includeTime ? d.toLocaleString('en-US') : d.toLocaleDateString('en-US')
36
+            return includeTime ? d.toLocaleString('en-US', { timeZone: 'UTC' }) : d.toLocaleDateString('en-US')
37
         },
37
         },
38
         async getPosts() {
38
         async getPosts() {
39
             this.$store.commit('CLEAR_EXHIBITIONS')
39
             this.$store.commit('CLEAR_EXHIBITIONS')

Loading…
Peruuta
Tallenna