Fix linting issues in timezone implementation

Co-authored-by: berry-13 <81851188+berry-13@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2025-10-21 21:32:01 +00:00
parent 9fe4554a70
commit 3c4c4d53dd
2 changed files with 3 additions and 2 deletions

View File

@@ -38,7 +38,8 @@ export default function createPayload(submission: t.TSubmission) {
conversationId,
isContinued: !!(isEdited && isContinued),
ephemeralAgent: s.isAssistantsEndpoint(endpoint) ? undefined : ephemeralAgent,
timezone: typeof Intl !== 'undefined' ? Intl.DateTimeFormat().resolvedOptions().timeZone : undefined,
timezone:
typeof Intl !== 'undefined' ? Intl.DateTimeFormat().resolvedOptions().timeZone : undefined,
};
return { server, payload };

View File

@@ -451,7 +451,7 @@ export function replaceSpecialVars({
const localDatetime = dayjs().tz(timezone).format('YYYY-MM-DD HH:mm:ss');
result = result.replace(/{{local_datetime}}/gi, `${localDatetime} (${localDayNumber})`);
} catch (error) {
} catch {
// If timezone is invalid, fall back to UTC values for local_* variables
result = result.replace(/{{local_date}}/gi, combinedDate);
result = result.replace(/{{local_datetime}}/gi, `${currentDatetime} (${dayNumber})`);