mirror of
https://github.com/casdoor/casdoor.git
synced 2025-05-23 02:35:49 +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 {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) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user