prorm API Reference
    Preparing search index...

    Interface TimezoneOptions

    Options for timezone decorator at column level

    interface TimezoneOptions {
        zone?: TimezoneSource;
        format?: TimezoneFormat;
        storeAs?: TimezoneStoreAs;
        column?: string;
        convertOnRead?: boolean;
        convertOnWrite?: boolean;
    }
    Index

    Timezone name (e.g., 'UTC', 'America/New_York') or source configuration for auto-detection

    Output format when reading from database

    • 'ISO': ISO 8601 string (2024-01-15T10:30:00.000Z)
    • 'DATE': Date only string (2024-01-15)
    • 'DATETIME': Date and time string (2024-01-15 10:30:00)
    • 'TIMESTAMP': Unix timestamp in milliseconds
    storeAs?: TimezoneStoreAs

    How to store timezone data in database

    • 'utc': Store as UTC (recommended)
    • 'local': Store as local time
    • 'string': Store as timezone-aware string
    column?: string

    Column name in the database (if different from property name)

    convertOnRead?: boolean

    Whether to convert on read (default: true)

    convertOnWrite?: boolean

    Whether to convert on write (default: true)