mirror of
https://github.com/casdoor/casdoor.git
synced 2025-05-22 18:25:47 +08:00
Fix getFormattedDate()
This commit is contained in:
parent
9c4f0f042e
commit
2389d47c34
@ -24,6 +24,7 @@ import {authConfig} from "./auth/Auth";
|
||||
import {Helmet} from "react-helmet";
|
||||
import * as Conf from "./Conf";
|
||||
import * as phoneNumber from "libphonenumber-js";
|
||||
import moment from "moment";
|
||||
|
||||
const {Option} = Select;
|
||||
|
||||
@ -592,9 +593,8 @@ export function getFormattedDate(date) {
|
||||
return null;
|
||||
}
|
||||
|
||||
date = date.replace("T", " ");
|
||||
date = date.replace("+08:00", " ");
|
||||
return date;
|
||||
const m = moment(date).local();
|
||||
return m.format("YYYY-MM-DD HH:mm:ss");
|
||||
}
|
||||
|
||||
export function getFormattedDateShort(date) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user