update
This commit is contained in:
@@ -82,7 +82,7 @@ define(['./workbox-b5f7729d'], (function (workbox) { 'use strict';
|
||||
"revision": "3ca0b8505b4bec776b69afdba2768812"
|
||||
}, {
|
||||
"url": "index.html",
|
||||
"revision": "0.r1a5oko6jr"
|
||||
"revision": "0.g2sg6ddrvtg"
|
||||
}], {});
|
||||
workbox.cleanupOutdatedCaches();
|
||||
workbox.registerRoute(new workbox.NavigationRoute(workbox.createHandlerBoundToURL("index.html"), {
|
||||
|
||||
@@ -28,3 +28,19 @@ export function formatRelativeDate(dateString) {
|
||||
export const timeZone = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
||||
console.log(timeZone); // e.g., "America/New_York"
|
||||
|
||||
|
||||
|
||||
export function formatUTCToDDMMYYHHMMSS(utcDateString) {
|
||||
const date = new Date(utcDateString);
|
||||
|
||||
// Extract individual date and time components
|
||||
const day = String(date.getUTCDate()).padStart(2, '0');
|
||||
const month = String(date.getUTCMonth() + 1).padStart(2, '0'); // Months are 0-based
|
||||
const year = String(date.getUTCFullYear()).slice(-2); // Get last two digits of the year
|
||||
const hours = String(date.getUTCHours()).padStart(2, '0');
|
||||
const minutes = String(date.getUTCMinutes()).padStart(2, '0');
|
||||
const seconds = String(date.getUTCSeconds()).padStart(2, '0');
|
||||
|
||||
// Combine the formatted parts
|
||||
return `${day}-${month}-${year} ${hours}:${minutes}:${seconds}`;
|
||||
}
|
||||
@@ -18,7 +18,7 @@ import Pagination from "../Pagination";
|
||||
import GlobalStateContext from "../../Contexts/GlobalStateContext";
|
||||
import { Link, useLocation, useNavigate } from "react-router-dom";
|
||||
import ToastBox from "../ToastBox";
|
||||
import { formatRelativeDate } from "../../Constants/Constants";
|
||||
import { formatRelativeDate, formatUTCToDDMMYYHHMMSS } from "../../Constants/Constants";
|
||||
import {
|
||||
useGetTransAllQuery,
|
||||
useGetTransCountQuery,
|
||||
@@ -377,7 +377,7 @@ const LatestTransactions = () => {
|
||||
Date and Time Stamp :
|
||||
</Text>
|
||||
<Text color={colorMode === "light" ? "#230A79" : "#B09AFF"}>
|
||||
{timestamp}
|
||||
{formatUTCToDDMMYYHHMMSS(timestamp)}
|
||||
</Text>
|
||||
</Box>
|
||||
<Box>
|
||||
|
||||
Reference in New Issue
Block a user