mirror of
https://github.com/immich-app/immich
synced 2025-10-17 18:19:27 +00:00
fix: time buckets (#4358)
* fix: time buckets * chore: update entity metadata * fix: set correct localDateTime * fix: display without timezone shifting * fix: handle non-utc databases * fix: scrollbar * docs: comment how buckets are sorted * chore: remove test/log * chore: lint --------- Co-authored-by: Jonathan Jogenfors <jonathan@jogenfors.se>
This commit is contained in:
parent
4a8887f37b
commit
35fa6397ea
8 changed files with 40 additions and 35 deletions
|
|
@ -1,5 +1,6 @@
|
|||
<script lang="ts">
|
||||
import type { AssetStore } from '$lib/stores/assets.store';
|
||||
import { fromLocalDateTime } from '$lib/utils/timeline-util';
|
||||
import { createEventDispatcher } from 'svelte';
|
||||
|
||||
export let timelineY = 0;
|
||||
|
|
@ -92,9 +93,9 @@
|
|||
{/if}
|
||||
<!-- Time Segment -->
|
||||
{#each segments as segment, index (segment.timeGroup)}
|
||||
{@const date = new Date(segment.timeGroup)}
|
||||
{@const year = date.getFullYear()}
|
||||
{@const label = `${date.toLocaleString('default', { month: 'short' })} ${year}`}
|
||||
{@const date = fromLocalDateTime(segment.timeGroup)}
|
||||
{@const year = date.year}
|
||||
{@const label = `${date.toLocaleString({ month: 'short' })} ${year}`}
|
||||
|
||||
<!-- svelte-ignore a11y-no-static-element-interactions -->
|
||||
<div
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue