Date Helper

    This helper is loaded using the following code:

    Available Functions

    The following functions are available:

    • ([$timezone = NULL])
    • $timezone (string) – TimezoneReturns:UNIX timestampReturn type:int

    Returns the current time as a UNIX timestamp, referenced either to your server’slocal time or any PHP supported timezone, based on the “time reference” settingin your config file. If you do not intend to set your master time reference toany other PHP supported timezone (which you’ll typically do if you run a sitethat lets each user set their own timezone settings) there is no benefit to usingthis function over PHP’s time() function.

    If a timezone is not provided, it will return based on thetime_reference setting.

    • $class (string) – Optional class to apply to the select field
    • $default (string) – Default value for initial selection
    • $country (string) –A two-letter ISO 3166-1 compatible country code (see )Returns:Preformatted HTML select fieldReturn type:string

    Generates a select form field of available timezones (optionally filtered by $what and $country).You can supply an option class to apply to the field to make formatting easier, as well as a defaultselected value.

    Many functions previously found in the CodeIgniter 3 have been moved to the I18nmodule in CodeIgniter 4.