Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix timezone conversion logic #11444

Merged
merged 3 commits into from
May 20, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Prev Previous commit
Next Next commit
Use function for consistency
  • Loading branch information
NickM-27 committed May 20, 2024
commit fc23e257dfca865da90616c9f3893fa556e33221
5 changes: 2 additions & 3 deletions web/src/components/player/dynamic/DynamicVideoPlayer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import { VideoResolutionType } from "@/types/live";
import axios from "axios";
import { cn } from "@/lib/utils";
import { getUTCOffset } from "@/utils/dateUtil";
import { getTimestampOffset, getUTCOffset } from "@/utils/dateUtil";

Check failure on line 15 in web/src/components/player/dynamic/DynamicVideoPlayer.tsx

View workflow job for this annotation

GitHub Actions / Web - Lint

'getUTCOffset' is defined but never used. Allowed unused vars must match /^_/u

/**
* Dynamically switches between video playback and scrubbing preview player.
Expand Down Expand Up @@ -149,8 +149,7 @@
// state of playback player

const recordingParams = useMemo(() => {
const timeRangeOffset =
(getUTCOffset(new Date(timeRange.before * 1000)) % 60) * 60;
const timeRangeOffset = getTimestampOffset(timeRange.before);

return {
before: timeRange.before + timeRangeOffset,
Expand Down