File:
[ELWIX - Embedded LightWeight unIX -] /
embedaddon /
php /
ext /
date /
tests /
DateTimeZone_getName_basic1.phpt
Revision
1.1.1.1 (vendor branch):
download - view:
text,
annotated -
select for diffs -
revision graph
Tue Feb 21 23:47:53 2012 UTC (13 years, 3 months ago) by
misho
Branches:
php,
MAIN
CVS tags:
v5_4_3elwix,
v5_4_29p0,
v5_4_29,
v5_4_20p0,
v5_4_20,
v5_4_17p0,
v5_4_17,
v5_3_10,
HEAD
php
--TEST--
Test DateTimeZone::getName() function : basic functionality
--FILE--
<?php
/* Prototype : public string DateTimeZone::getName ( void )
* Description: Returns the name of the timezone
* Source code: ext/date/php_date.c
* Alias to functions: timezone_name_get()
*/
echo "*** Testing DateTimeZone::getName() : basic functionality ***\n";
//Set the default time zone
date_default_timezone_set("GMT");
$tz1 = new DateTimeZone("Europe/London");
var_dump( $tz1->getName() );
$tz2 = new DateTimeZone("America/New_York");
var_dump( $tz2->getName() );
$tz3 = new DateTimeZone("America/Los_Angeles");
var_dump( $tz3->getName() );
?>
===DONE===
--EXPECT--
*** Testing DateTimeZone::getName() : basic functionality ***
string(13) "Europe/London"
string(16) "America/New_York"
string(19) "America/Los_Angeles"
===DONE===
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>