mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-24 15:31:13 -05:00
Fix timezone-independent date display
This commit is contained in:
@@ -3,6 +3,7 @@ import { Badge } from '@/components/ui/badge';
|
||||
import { History } from 'lucide-react';
|
||||
import { RideNameHistory } from '@/types/database';
|
||||
import { format } from 'date-fns';
|
||||
import { parseDateForDisplay } from '@/lib/dateUtils';
|
||||
|
||||
interface FormerName {
|
||||
name: string;
|
||||
@@ -83,7 +84,7 @@ export function FormerNames({ formerNames, nameHistory, currentName }: FormerNam
|
||||
</div>
|
||||
)}
|
||||
{former.date_changed && (
|
||||
<div>Changed: {format(new Date(former.date_changed), 'MMM d, yyyy')}</div>
|
||||
<div>Changed: {format(parseDateForDisplay(former.date_changed), 'MMM d, yyyy')}</div>
|
||||
)}
|
||||
{former.reason && (
|
||||
<div className="italic">{former.reason}</div>
|
||||
|
||||
Reference in New Issue
Block a user