MCPcopy Index your code
hub / github.com/agent0ai/agent-zero / toUserISOString

Function toUserISOString

webui/js/time-utils.js:158–164  ·  view source on GitHub ↗
(date = new Date())

Source from the content-addressed store, hash-verified

156 * @returns {string} Local ISO string, e.g. 2026-05-03T10:15:30.000+02:00
157 */
158export function toUserISOString(date = new Date()) {
159 if (!date) return "";
160 const timeZone = getUserTimezone();
161 const parts = getTimeZoneParts(date, timeZone);
162 const offsetMinutes = getTimeZoneOffsetMinutes(date, timeZone, parts);
163 return formatPartsAsIso(parts, offsetMinutes);
164}
165
166/**
167 * Interpret a browser-local Date's visible wall-clock fields in the configured user timezone.

Callers 2

normalizePlanStructFunction · 0.90
getCurrentUserISOStringFunction · 0.85

Calls 4

getUserTimezoneFunction · 0.85
getTimeZonePartsFunction · 0.85
getTimeZoneOffsetMinutesFunction · 0.85
formatPartsAsIsoFunction · 0.85

Tested by

no test coverage detected