Use luxon for DateTime
Signed-off-by: josh <josh.timmons@hashicorp.com>
This commit is contained in:
+5
-1
@@ -14,6 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { DateTime } from 'luxon';
|
||||
import {
|
||||
Link,
|
||||
MissingAnnotationEmptyState,
|
||||
@@ -64,7 +65,10 @@ const columns: TableColumn<rowType>[] = [
|
||||
{
|
||||
title: 'Created',
|
||||
field: 'CreateTime',
|
||||
render: row => new Date(row.CreateTime / 1000000).toLocaleString(),
|
||||
render: row =>
|
||||
DateTime.fromMillis(row.CreateTime / 1000000).toLocaleString(
|
||||
DateTime.DATETIME_MED_WITH_SECONDS,
|
||||
),
|
||||
},
|
||||
{
|
||||
title: 'Status',
|
||||
|
||||
+5
-1
@@ -14,6 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { DateTime } from 'luxon';
|
||||
import {
|
||||
InfoCard,
|
||||
MissingAnnotationEmptyState,
|
||||
@@ -49,7 +50,10 @@ const columns: TableColumn<rowType>[] = [
|
||||
{
|
||||
title: 'Submitted',
|
||||
field: 'SubmitTime',
|
||||
render: row => new Date(row.SubmitTime / 1000000).toLocaleString(),
|
||||
render: row =>
|
||||
DateTime.fromMillis(row.SubmitTime / 1000000).toLocaleString(
|
||||
DateTime.DATETIME_MED_WITH_SECONDS,
|
||||
),
|
||||
},
|
||||
];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user