PHP » GoLang |
login |
register |
about
|
GoLang DateTimeZone::__construct
request it (471)
GoLang replacement for PHP's DateTimeZone::__construct
[edit | history]
DateTimeZone::__constructtimezone_open(PHP 5 >= 5.2.0, PHP 7) DateTimeZone::__construct -- timezone_open — Creates new DateTimeZone object DescriptionObject oriented style
public DateTimeZone::__construct
( string
$timezone
)Procedural style Creates new DateTimeZone object. Return Values
Returns DateTimeZone on success.
Procedural style returns Errors/ExceptionsThis method throws Exception if the timezone supplied is not recognised as a valid timezone. Changelog
Examples
Example #1 Catching errors when instantiating DateTimeZone
<?php The above example will output: DateTimeZone::__construct() [datetimezone.--construct]: Unknown or bad timezone (Mars/Phobos) DateTimeZone::__construct() [datetimezone.--construct]: Unknown or bad timezone (Jupiter/Europa) |
more
Recently updated
more
Most requested
more
Last requests
|