Use configured locale for timestamp formatting

This commit is contained in:
Linus Groh
2019-12-14 16:48:18 +00:00
parent 1d106e45da
commit 8d2f22d3de
+8 -1
View File
@@ -7,7 +7,7 @@
<ul class="info-list">
<li :title="$t('Timestamp')">
<ClockIcon size="1x" aria-hidden="true" role="img" />
{{ new Date(timestamp * 1000).toLocaleString() }}
{{ new Date(timestamp * 1000).toLocaleString(locale) }}
</li>
<li :title="$t('Location')">
<MapPinIcon size="1x" aria-hidden="true" role="img" />
@@ -64,6 +64,8 @@ import {
} from "vue-feather-icons";
import { LPopup } from "vue2-leaflet";
import config from "@/config";
export default {
name: "LDeviceLocationPopup",
components: {
@@ -120,6 +122,11 @@ export default {
default: null,
},
},
data() {
return {
locale: config.locale,
};
},
computed: {
/**
* Return the face image as a data URI string which can be used for an image's src attribute