Statusphere running on a slice 馃崟
at main 305 B view raw
1export function getUserTimezone(req: Request): string | undefined { 2 const cookieHeader = req.headers.get("cookie") || ""; 3 const timezoneCookie = cookieHeader.split("; ").find(row => row.startsWith("timezone=")); 4 return timezoneCookie ? decodeURIComponent(timezoneCookie.split("=")[1]) : undefined; 5}