From 061f266b18eced41f1cb6339c0d58ed85265c749 Mon Sep 17 00:00:00 2001 From: lorentz Date: Thu, 7 May 2026 07:36:35 -0400 Subject: [PATCH] feat(07.1-01): expose user timezone on Better Auth session MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Adds `timezone` to additionalFields on the auth `user` config - Default value reads process.env.DEFAULT_TIMEZONE (falls back to "UTC") - session.user.timezone now available on every authenticated request - Inferred User type automatically picks up the new field — no type changes needed --- lib/auth.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/auth.ts b/lib/auth.ts index 12c17e5..f8eea01 100644 --- a/lib/auth.ts +++ b/lib/auth.ts @@ -92,6 +92,10 @@ export const auth = betterAuth({ type: "boolean", defaultValue: false, }, + timezone: { + type: "string", + defaultValue: process.env.DEFAULT_TIMEZONE || "UTC", + }, }, }, });