timezone

package
v0.0.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 15, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package timezone provides per-tenant timezone management.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get(ctx context.Context) (*time.Location, error)

Get returns the timezone for the tenant in ctx. Defaults to UTC if the tenant has no timezone set. Returns an error if no tenant ID is present in ctx.

func Now

func Now(ctx context.Context) time.Time

Now returns the current time in the tenant's timezone. Defaults to UTC if tenant has no timezone set or no tenant ID in ctx.

func Set

func Set(tenantID string, loc *time.Location)

Set stores the timezone location for tenantID.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL