Fix getFormattedDate()

This commit is contained in:
Yang Luo 2023-05-23 15:09:53 +08:00
parent 9c4f0f042e
commit 2389d47c34

View File

@ -24,6 +24,7 @@ import {authConfig} from "./auth/Auth";
import {Helmet} from "react-helmet"; import {Helmet} from "react-helmet";
import * as Conf from "./Conf"; import * as Conf from "./Conf";
import * as phoneNumber from "libphonenumber-js"; import * as phoneNumber from "libphonenumber-js";
import moment from "moment";
const {Option} = Select; const {Option} = Select;
@ -592,9 +593,8 @@ export function getFormattedDate(date) {
return null; return null;
} }
date = date.replace("T", " "); const m = moment(date).local();
date = date.replace("+08:00", " "); return m.format("YYYY-MM-DD HH:mm:ss");
return date;
} }
export function getFormattedDateShort(date) { export function getFormattedDateShort(date) {