API > eden > timezone.php
View Source

class Eden_Timezone

Timezone convert-o-matic

Constants

  • GMT: GMT
  • UTC: UTC

Public Methods

public function convertTo($zone, $format = NULL)

Convert current time set here to another time zone

Arguments

  1. string valid UTC, GMT, PHP Location or TZ Abbreviation
  2. string|null

Returns string|int

public function getGMT($prefix = self::GMT)

Returns the GMT Format

Returns string

public function getGMTDates($format, $interval = 30, $prefix = self::GMT)

Returns a list of GMT formats and dates in a 24 hour period

Arguments

  1. string
  2. int
  3. string|null

Returns array

public function getOffset()

Returns the current offset of this timezone

Returns int

public function getOffsetDates($format, $interval = 30)

Returns a list of offsets and dates in a 24 hour period

Arguments

  1. string
  2. int

Returns array

public function getTime($format = NULL)

Returns the time or date

Returns string|null

public function getUTC($prefix = self::UTC)

Returns the UTC Format

Returns string

public function getUTCDates($format, $interval = 30, $prefix = self::UTC)

Returns a list of UTC formats and dates in a 24 hour period

Arguments

  1. string
  2. int
  3. string|null

Returns array

public function setTime($time)

Sets a new time

Arguments

  1. int|string

Returns this

public function validation()

Returns timezone's validation methods

Returns Eden_Timezone_Validation


© 2012 Openovate Labs. All rights reserved.