Fix Bug 64907 - Accounts: Replace islamic dates with gregorian
This commit is contained in:
parent
bbd59c1631
commit
9308ee0fbe
@ -28,6 +28,7 @@ import {
|
||||
TableBody,
|
||||
TableDataCell,
|
||||
} from "./styled-active-sessions";
|
||||
import moment from "moment";
|
||||
|
||||
const removeIcon = (
|
||||
<ReactSVG className="remove-icon" src={RemoveSessionSvgUrl} />
|
||||
@ -109,7 +110,7 @@ const ActiveSessions = ({
|
||||
};
|
||||
|
||||
const convertTime = (date) => {
|
||||
return new Date(date).toLocaleString(locale);
|
||||
return moment(date).locale(locale).format("L, LTS");
|
||||
};
|
||||
const tableCell = (platform, browser) =>
|
||||
interfaceDirection === "rtl" && isDesktop() ? (
|
||||
@ -170,7 +171,9 @@ const ActiveSessions = ({
|
||||
<span className="session-date">
|
||||
{convertTime(session.date)}
|
||||
</span>
|
||||
<span className="session-ip">{session.ip}</span>
|
||||
<span className="session-ip" dir="ltr">
|
||||
{session.ip}
|
||||
</span>
|
||||
</Box>
|
||||
</TableDataCell>
|
||||
|
||||
|
@ -20,6 +20,7 @@ import toastr from "@docspace/components/toast/toastr";
|
||||
import { Encoder } from "@docspace/common/utils/encoder";
|
||||
import { Base } from "@docspace/components/themes";
|
||||
import { MAX_FILE_COMMENT_LENGTH } from "@docspace/common/constants";
|
||||
import moment from "moment";
|
||||
|
||||
const StyledExternalLinkIcon = styled(ExternalLinkIcon)`
|
||||
${commonIconsStyles}
|
||||
@ -56,7 +57,9 @@ const VersionRow = (props) => {
|
||||
|
||||
const navigate = useNavigate();
|
||||
|
||||
const versionDate = `${new Date(info.updated).toLocaleString(culture)}`;
|
||||
const versionDate = `${moment(info.updated)
|
||||
.locale(culture)
|
||||
.format("L, LTS")}`;
|
||||
const title = `${Encoder.htmlDecode(info.updatedBy?.displayName)}`;
|
||||
|
||||
const linkStyles = { isHovered: true, type: "action" };
|
||||
|
@ -1,3 +1,6 @@
|
||||
import moment from "moment";
|
||||
|
||||
export const convertTime = (date, locale) => {
|
||||
return new Date(date).toLocaleString(locale);
|
||||
console.log(date);
|
||||
return moment(date).locale(locale).format("L, LTS");
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user