datetime.gettimezone(3) php man page | unix.com

Man Page: datetime.gettimezone

Operating Environment: php

Section: 3

DATETIME.GETTIMEZONE(3) 						 1						   DATETIME.GETTIMEZONE(3)

DateTime::getTimezone - Return time zone relative to given DateTime

       Object oriented style

SYNOPSIS
public DateTimeZone DateTime::getTimezone (void )
DESCRIPTION
DateTimeZone DateTimeImmutable::getTimezone (void ) DateTimeZone DateTimeInterface::getTimezone (void ) Procedural style DateTimeZone date_timezone_get (DateTimeInterface $object) Return time zone relative to given DateTime.
PARAMETERS
o $object -Procedural style only: A DateTime object returned by date_create(3)
RETURN VALUES
Returns a DateTimeZone object on success or FALSE on failure.
EXAMPLES
Example #1 DateTime.getTimezone(3) example Object oriented style <?php $date = new DateTime(null, new DateTimeZone('Europe/London')); $tz = $date->getTimezone(); echo $tz->getName(); ?> Procedural style <?php $date = date_create(null, timezone_open('Europe/London')); $tz = date_timezone_get($date); echo timezone_name_get($tz); ?> The above examples will output: Europe/London
SEE ALSO
DateTime.setTimezone(3). PHP Documentation Group DATETIME.GETTIMEZONE(3)
Related Man Pages
datetime.__construct(3) - php
datetime.modify(3) - php
datetime.setdate(3) - php
datetime.setisodate(3) - php
datetime.add(3) - php
Similar Topics in the Unix Linux Community
Lagnet
Hello everyone...
Senior Systems Administrator-Linux-TCP/IP-London-£45000 PA - ComputerWeekly.com
Canonical Design Blog: Design museum exhibition London
Urgent! Dreadfully need help! Lost Android Text Messages!