Skip to main content

format_datetime_display

Function format_datetime_display 

Source
fn format_datetime_display(iso: &str) -> String
Expand description

Format an ISO 8601 timestamp for display, converting from UTC to the user’s local timezone.

Immich normalises date_time_original and fileCreatedAt to UTC before storage, so a photo taken at 19:55:15+05:30 is stored as 2024-01-15T14:25:15.000Z. We parse the UTC value and convert it to the system’s local timezone so the displayed time matches what the camera originally recorded. Falls back to the raw string if parsing fails.