diff --git a/fields/types/date/DateColumn.js b/fields/types/date/DateColumn.js index d3c4880da0..a009d3a646 100644 --- a/fields/types/date/DateColumn.js +++ b/fields/types/date/DateColumn.js @@ -10,12 +10,19 @@ var DateColumn = React.createClass({ data: React.PropTypes.object, linkTo: React.PropTypes.string, }, + toMoment (value) { + if (this.props.col.field.isUTC) { + return moment.utc(value); + } else { + return moment(value); + } + }, getValue () { const value = this.props.data.fields[this.props.col.path]; if (!value) return null; const format = (this.props.col.type === 'datetime') ? 'MMMM Do YYYY, h:mm:ss a' : 'MMMM Do YYYY'; - return moment(value).format(format); + return this.toMoment(value).format(format); }, render () { const value = this.getValue();