mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00:00
fix(web): timezone handling in search filter (#7384)
This commit is contained in:
parent
57758293e5
commit
6ec4c5874b
5 changed files with 29 additions and 27 deletions
|
|
@ -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();
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue