mirror of
https://github.com/strapi/strapi.git
synced 2025-08-09 01:07:27 +00:00
Fix date display in ctm
Signed-off-by: soupette <cyril.lpz@gmail.com>
This commit is contained in:
parent
2b8cae78c6
commit
5d57fcc1b5
@ -1,5 +1,5 @@
|
||||
import moment from 'moment';
|
||||
|
||||
const dateToUtcTime = date => moment(date).utc();
|
||||
const dateToUtcTime = date => moment.parseZone(date).utc();
|
||||
|
||||
export default dateToUtcTime;
|
||||
|
@ -3,7 +3,7 @@ import { withRouter } from 'react-router';
|
||||
import PropTypes from 'prop-types';
|
||||
import { get, isEmpty, isNull, isObject, toLower, toString } from 'lodash';
|
||||
import moment from 'moment';
|
||||
import { dateToUtcTime, IcoContainer, useGlobalContext } from 'strapi-helper-plugin';
|
||||
import { IcoContainer, useGlobalContext } from 'strapi-helper-plugin';
|
||||
import useListView from '../../hooks/useListView';
|
||||
import dateFormats from '../../utils/dateFormats';
|
||||
import CustomInputCheckbox from '../CustomInputCheckbox';
|
||||
@ -37,7 +37,7 @@ const getDisplayedValue = (type, value, name) => {
|
||||
const date =
|
||||
value && isObject(value) && value._isAMomentObject === true ? JSON.stringify(value) : value;
|
||||
|
||||
return dateToUtcTime(date).format(dateFormats[type]);
|
||||
return moment(date).format(dateFormats[type]);
|
||||
}
|
||||
case 'password':
|
||||
return '••••••••';
|
||||
|
Loading…
x
Reference in New Issue
Block a user