File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ const INITIAL_MESSAGE: Message = {
1313 Upload an image and ask how you want your images edited.\
1414 You may select multiple images for me to refer to." ,
1515 sender : "agent" ,
16- timestamp : new Date ( "2024-01-01T00:00:00Z" ) , // Static timestamp for hydration
16+ timestamp : new Date ( ) , // Use current time instead of static timestamp
1717} ;
1818
1919const SAMPLE_IMAGES : ImageItem [ ] = [
Original file line number Diff line number Diff line change @@ -96,7 +96,11 @@ export default function ChatInterface({
9696
9797 const formatTime = ( date : Date ) => {
9898 if ( ! isClient ) return "" ; // Don't render time on server to avoid hydration mismatch
99- return date . toLocaleTimeString ( [ ] , { hour : "2-digit" , minute : "2-digit" } ) ;
99+ return date . toLocaleTimeString ( navigator . language , {
100+ hour : "2-digit" ,
101+ minute : "2-digit" ,
102+ timeZone : Intl . DateTimeFormat ( ) . resolvedOptions ( ) . timeZone ,
103+ } ) ;
100104 } ;
101105
102106 const TypingIndicator = ( ) => (
You can’t perform that action at this time.
0 commit comments