Actually fix the time formatting
This commit is contained in:
parent
b6a6f45f45
commit
9eaeb21867
@ -12,12 +12,6 @@ import { Component, Prop, Vue } from 'vue-property-decorator';
|
|||||||
import { BvTableFieldArray, BvTableFormatterCallback } from 'bootstrap-vue';
|
import { BvTableFieldArray, BvTableFormatterCallback } from 'bootstrap-vue';
|
||||||
import { LoginAttempt } from '@/apiary/apiary';
|
import { LoginAttempt } from '@/apiary/apiary';
|
||||||
|
|
||||||
const timeFormatter: BvTableFormatterCallback = (value: string): string => {
|
|
||||||
const d = new Date(value);
|
|
||||||
const s = `${d.getUTCHours}:${d.getUTCMinutes}:${d.getUTCSeconds}`;
|
|
||||||
return s;
|
|
||||||
};
|
|
||||||
|
|
||||||
@Component
|
@Component
|
||||||
export default class AttemptList extends Vue {
|
export default class AttemptList extends Vue {
|
||||||
@Prop() private items!: LoginAttempt[];
|
@Prop() private items!: LoginAttempt[];
|
||||||
@ -28,7 +22,10 @@ export default class AttemptList extends Vue {
|
|||||||
{
|
{
|
||||||
key: 'date',
|
key: 'date',
|
||||||
sortable: true,
|
sortable: true,
|
||||||
formatter: timeFormatter,
|
formatter: (value: string): string => {
|
||||||
|
const d = new Date(value);
|
||||||
|
return `${d.getUTCHours()}:${d.getUTCMinutes()}:${d.getUTCSeconds()}`;
|
||||||
|
},
|
||||||
sortByFormatted: false,
|
sortByFormatted: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user