aboutsummaryrefslogtreecommitdiff
path: root/modern/src/other
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2022-11-06 17:00:03 -0800
committerAnton Tananaev <anton@traccar.org>2022-11-06 17:00:03 -0800
commita9c8b1b6c513257a5fd69cf00992d4fec59d6069 (patch)
treeb2fa1bd33ae8766affb4ac1cfdba2dde5a9a54de /modern/src/other
parent4d6d5eca8c6ee8c43340d18d323816885edeb9da (diff)
downloadtrackermap-web-a9c8b1b6c513257a5fd69cf00992d4fec59d6069.tar.gz
trackermap-web-a9c8b1b6c513257a5fd69cf00992d4fec59d6069.tar.bz2
trackermap-web-a9c8b1b6c513257a5fd69cf00992d4fec59d6069.zip
Respect 12 hour time
Diffstat (limited to 'modern/src/other')
-rw-r--r--modern/src/other/ReplayPage.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/modern/src/other/ReplayPage.js b/modern/src/other/ReplayPage.js
index 8839138f..1050b976 100644
--- a/modern/src/other/ReplayPage.js
+++ b/modern/src/other/ReplayPage.js
@@ -25,6 +25,7 @@ import { useCatch } from '../reactHelper';
import MapCamera from '../map/MapCamera';
import MapGeofence from '../map/MapGeofence';
import StatusCard from '../common/components/StatusCard';
+import { usePreference } from '../common/util/preferences';
const useStyles = makeStyles((theme) => ({
root: {
@@ -81,6 +82,8 @@ const ReplayPage = () => {
const navigate = useNavigate();
const timerRef = useRef();
+ const hours12 = usePreference('twelveHourFormat');
+
const defaultDeviceId = useSelector((state) => state.devices.selectedId);
const [positions, setPositions] = useState([]);
@@ -207,7 +210,7 @@ const ReplayPage = () => {
<IconButton onClick={() => setIndex((index) => index + 1)} disabled={playing || index >= positions.length - 1}>
<FastForwardIcon />
</IconButton>
- {formatTime(positions[index].fixTime)}
+ {formatTime(positions[index].fixTime, 'seconds', hours12)}
</div>
</>
) : (