File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -2462,6 +2462,22 @@ export class Cline {
24622462 details += terminalDetails
24632463 }
24642464
2465+ // Add current time information with timezone
2466+ const now = new Date ( )
2467+ const formatter = new Intl . DateTimeFormat ( undefined , {
2468+ year : 'numeric' ,
2469+ month : 'numeric' ,
2470+ day : 'numeric' ,
2471+ hour : 'numeric' ,
2472+ minute : 'numeric' ,
2473+ second : 'numeric' ,
2474+ hour12 : true
2475+ } )
2476+ const timeZone = formatter . resolvedOptions ( ) . timeZone
2477+ const timeZoneOffset = - now . getTimezoneOffset ( ) / 60 // Convert to hours and invert sign to match conventional notation
2478+ const timeZoneOffsetStr = `${ timeZoneOffset >= 0 ? '+' : '' } ${ timeZoneOffset } :00`
2479+ details += `\n\n# Current Time\n${ formatter . format ( now ) } (${ timeZone } , UTC${ timeZoneOffsetStr } )`
2480+
24652481 if ( includeFileDetails ) {
24662482 details += `\n\n# Current Working Directory (${ cwd . toPosix ( ) } ) Files\n`
24672483 const isDesktop = arePathsEqual ( cwd , path . join ( os . homedir ( ) , "Desktop" ) )
You can’t perform that action at this time.
0 commit comments