mirror of
https://github.com/immich-app/immich.git
synced 2025-12-21 17:25:35 +03:00
fix(web): timezone handling in search filter (#7384)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { timeToSeconds } from './time-to-seconds';
|
||||
import { timeToSeconds } from './date-time';
|
||||
|
||||
describe('converting time to seconds', () => {
|
||||
it('parses hh:mm:ss correctly', () => {
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Duration } from 'luxon';
|
||||
import { DateTime, Duration } from 'luxon';
|
||||
|
||||
/**
|
||||
* Convert time like `01:02:03.456` to seconds.
|
||||
@@ -11,3 +11,7 @@ export function timeToSeconds(time: string) {
|
||||
|
||||
return Duration.fromObject({ hours, minutes, seconds }).as('seconds');
|
||||
}
|
||||
|
||||
export function parseUtcDate(date: string) {
|
||||
return DateTime.fromISO(date, { zone: 'UTC' }).toUTC();
|
||||
}
|
||||
Reference in New Issue
Block a user