fixed timezones for current stream lol
This commit is contained in:
parent
a6a3e6c28e
commit
16e45c3030
6
index.js
6
index.js
@ -40,11 +40,11 @@ const App = () => {
|
|||||||
const utcEndDate = zonedTimeToUtc(new Date(stream.endsOn), 'Europe/Berlin')
|
const utcEndDate = zonedTimeToUtc(new Date(stream.endsOn), 'Europe/Berlin')
|
||||||
const { timeZone } = Intl.DateTimeFormat().resolvedOptions()
|
const { timeZone } = Intl.DateTimeFormat().resolvedOptions()
|
||||||
|
|
||||||
const zonedStartDate = utcToZonedTime(utcStartDate, timeZone)
|
const zonedStartDate = utcToZonedTime(utcStartDate, 'Europe/Berlin')
|
||||||
const zonedEndDate = utcToZonedTime(utcEndDate, timeZone)
|
const zonedEndDate = utcToZonedTime(utcEndDate, 'Europe/Berlin')
|
||||||
if (
|
if (
|
||||||
isWithinInterval(new Date(), {
|
isWithinInterval(new Date(), {
|
||||||
start: subHours(zonedStartDate, 1),
|
start: subHours(zonedStartDate, 2),
|
||||||
end: addHours(zonedEndDate, 1),
|
end: addHours(zonedEndDate, 1),
|
||||||
})
|
})
|
||||||
) {
|
) {
|
||||||
|
@ -18,7 +18,7 @@ import config from '../../data/config'
|
|||||||
import { slugify } from '../../helpers/string'
|
import { slugify } from '../../helpers/string'
|
||||||
|
|
||||||
export const TrailerContainer = styled.div`
|
export const TrailerContainer = styled.div`
|
||||||
height: 22em;
|
height: 21em;
|
||||||
border: 1px solid ${colours.midnightDarker};
|
border: 1px solid ${colours.midnightDarker};
|
||||||
margin-bottom: 16px;
|
margin-bottom: 16px;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user