Silla.IO API
  • Namespace
  • Class
  • Tree
  • Todo
  • Download

Namespaces

  • App
    • Controllers
  • CMS
    • Controllers
    • Helpers
    • Models
  • Configurations
    • CI
    • Development
    • Production
    • Staging
  • Core
    • Base
    • CLI
      • Cache
      • DB
    • Helpers
    • Modules
      • Cache
        • Adapters
        • Interfaces
      • Crypt
      • DB
        • Adapters
        • Decorators
          • Interfaces
        • Features
          • Paginator
        • Interfaces
      • Registry
      • Render
        • Adapters
        • Interfaces
      • Router
      • Session
        • Adapters
        • Interfaces
  • None
  • Tasks
    • DB

Classes

  • DateTime
  • Directory
  • File
  • Image
  • Mailer
  • SQL
  • YAML

Class DateTime

Contains helper methods concerned with date and time manipulation.

Namespace: Core\Helpers
Located at helpers/datetime.php

Methods summary

public static array
# getTimezonesList( )

Fetches all available timezone codes.

Fetches all available timezone codes.

Returns

array
Timezones with locations and location offsets from GMT.
public static boolean
# setEnvironmentTimezone( string $timezone )

Changes the default PHP time/date functions timezone.

Changes the default PHP time/date functions timezone.

Parameters

$timezone
Valid timezone code.

Returns

boolean
FALSE if the $timezone isn't valid, or TRUE otherwise.
public static string
# format( string $datetime, string $format = 'Y-m-d H:i:s' )

Format a datetime string to currently set timezone according to given format.

Format a datetime string to currently set timezone according to given format.

Parameters

$datetime
String representation of a datetime object.
$format
Format of the returned date.

Returns

string
Formatted according to the given format using the given Unix timestamp.
public static string
# formatGmt( string $datetime, string $format = 'Y-m-d H:i:s' )

Format a datetime string to UTC/GMT according to given format.

Format a datetime string to UTC/GMT according to given format.

Parameters

$datetime
String representation of a datetime object.
$format
Format of the returned date.

Returns

string
Silla.IO API API documentation generated by ApiGen