Skip to content

Commit

Permalink
support timestamp in seconds
Browse files Browse the repository at this point in the history
  • Loading branch information
jianwu committed Mar 9, 2024
1 parent f2dc9ef commit b16b670
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/components/SimpleValue.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ export default class SimpleValue extends Vue {
if (_.isNumber(val) && val > 315532800000 && val < 2208988800000) {
return `\n${new Date(val as number).toISOString()}`;
}
// Numbers that are in seconds
if (_.isNumber(val) && val > 315532800 && val < 2208988800) {
return `\n${new Date((val as number) * 1000).toISOString()}`;
}
return null;
}
Expand Down

0 comments on commit b16b670

Please sign in to comment.