diff --git a/frontend/src/Episode/History/EpisodeHistory.js b/frontend/src/Episode/History/EpisodeHistory.js
index 78f05a82d..eaaa756cf 100644
--- a/frontend/src/Episode/History/EpisodeHistory.js
+++ b/frontend/src/Episode/History/EpisodeHistory.js
@@ -66,6 +66,8 @@ class EpisodeHistory extends Component {
isPopulated,
error,
items,
+ timeFormat,
+ shortDateFormat,
onMarkAsFailedPress
} = this.props;
@@ -101,6 +103,8 @@ class EpisodeHistory extends Component {
);
@@ -120,6 +124,8 @@ EpisodeHistory.propTypes = {
isPopulated: PropTypes.bool.isRequired,
error: PropTypes.object,
items: PropTypes.arrayOf(PropTypes.object).isRequired,
+ timeFormat: PropTypes.string.isRequired,
+ shortDateFormat: PropTypes.string.isRequired,
onMarkAsFailedPress: PropTypes.func.isRequired
};
diff --git a/frontend/src/Episode/History/EpisodeHistoryConnector.js b/frontend/src/Episode/History/EpisodeHistoryConnector.js
index 1e3414646..f86d26e78 100644
--- a/frontend/src/Episode/History/EpisodeHistoryConnector.js
+++ b/frontend/src/Episode/History/EpisodeHistoryConnector.js
@@ -3,13 +3,19 @@ import React, { Component } from 'react';
import { connect } from 'react-redux';
import { createSelector } from 'reselect';
import { clearEpisodeHistory, episodeHistoryMarkAsFailed, fetchEpisodeHistory } from 'Store/Actions/episodeHistoryActions';
+import createUISettingsSelector from 'Store/Selectors/createUISettingsSelector';
import EpisodeHistory from './EpisodeHistory';
function createMapStateToProps() {
return createSelector(
(state) => state.episodeHistory,
- (episodeHistory) => {
- return episodeHistory;
+ createUISettingsSelector(),
+ (episodeHistory, uiSettings) => {
+ return {
+ ...episodeHistory,
+ timeFormat: uiSettings.timeFormat,
+ shortDateFormat: uiSettings.shortDateFormat
+ };
}
);
}
diff --git a/frontend/src/Episode/History/EpisodeHistoryRow.js b/frontend/src/Episode/History/EpisodeHistoryRow.js
index d49f2c963..7f439e648 100644
--- a/frontend/src/Episode/History/EpisodeHistoryRow.js
+++ b/frontend/src/Episode/History/EpisodeHistoryRow.js
@@ -5,7 +5,6 @@ import HistoryEventTypeCell from 'Activity/History/HistoryEventTypeCell';
import Icon from 'Components/Icon';
import IconButton from 'Components/Link/IconButton';
import ConfirmModal from 'Components/Modal/ConfirmModal';
-import RelativeDateCellConnector from 'Components/Table/Cells/RelativeDateCellConnector';
import TableRowCell from 'Components/Table/Cells/TableRowCell';
import TableRow from 'Components/Table/TableRow';
import Popover from 'Components/Tooltip/Popover';
@@ -13,6 +12,7 @@ import EpisodeFormats from 'Episode/EpisodeFormats';
import EpisodeLanguages from 'Episode/EpisodeLanguages';
import EpisodeQuality from 'Episode/EpisodeQuality';
import { icons, kinds, tooltipPositions } from 'Helpers/Props';
+import formatDateTime from 'Utilities/Date/formatDateTime';
import formatCustomFormatScore from 'Utilities/Number/formatCustomFormatScore';
import translate from 'Utilities/String/translate';
import styles from './EpisodeHistoryRow.css';
@@ -72,7 +72,9 @@ class EpisodeHistoryRow extends Component {
customFormatScore,
date,
data,
- downloadId
+ downloadId,
+ timeFormat,
+ shortDateFormat
} = this.props;
const {
@@ -109,9 +111,9 @@ class EpisodeHistoryRow extends Component {
{formatCustomFormatScore(customFormatScore, customFormats.length)}
-
+
+ {formatDateTime(date, shortDateFormat, timeFormat, { includeSeconds: true })}
+
-
+
+ {formatDateTime(date, shortDateFormat, timeFormat, { includeSeconds: true })}
+
{
+ createUISettingsSelector(),
+ (series, episode, uiSettings) => {
return {
series,
- episode
+ episode,
+ timeFormat: uiSettings.timeFormat,
+ shortDateFormat: uiSettings.shortDateFormat
};
}
);