convert time to local time
This commit is contained in:
parent
5d089a7300
commit
9d160e9662
2 changed files with 3 additions and 2 deletions
|
|
@ -115,7 +115,8 @@
|
||||||
if (!match) return '';
|
if (!match) return '';
|
||||||
|
|
||||||
const [, timestamp, connections, dlTotal, dlRate, ulTotal, ulRate] = match;
|
const [, timestamp, connections, dlTotal, dlRate, ulTotal, ulRate] = match;
|
||||||
const time = timestamp.split(' ')[1];
|
const utcDate = new Date(`${timestamp.replace(/\//g, '-')}Z`);
|
||||||
|
const time = utcDate.toLocaleTimeString([], { hour: '2-digit', minute: '2-digit', second: '2-digit' });
|
||||||
|
|
||||||
return `<tr>
|
return `<tr>
|
||||||
<td>${time}</td>
|
<td>${time}</td>
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "snowflake-dashboard",
|
"name": "snowflake-dashboard",
|
||||||
"version": "0.1.0",
|
"version": "0.1.1",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"license": "AGPL-3.0",
|
"license": "AGPL-3.0",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue