Function: activeAssignmentTimezone()
activeAssignmentTimezone(
svc,contractorId):Promise<string|null>
Defined in: src/server/services/assignments.ts:43
The IANA timezone of the facility a contractor is currently assigned to, or null if they have
no active assignment.
This is the clock that decides which calendar day a contractor's hours are filed under —
punchIn stamps entry_date with it — so anything that asks "what day/period is it for this
contractor?" must read it from here rather than from UTC or the company operating zone, or it can
disagree with the hours being written in the same minute.
Parameters
svc
SupabaseClient
Service-role client (the facilities table is RLS-restricted to admins/owner).
contractorId
string
The contractor whose active assignment to resolve.
Returns
Promise<string | null>
The facility's IANA timezone, or null when there is no active assignment.