This function is not supported on many of the Php versions so please check this function by an example mine is php5.2.5 version.
here is the example i tried:
if(function_exists('getOffset'))
{
$dateSrc = '2007-04-19 12:50 GMT';
$dateTime = new DateTime($dateSrc);
$retval = $dateTime->getOffset();
echo "Returned value is $retval";
}
else{ echo "This function is not supported by ur phpversion";
}
if we are suppose to change the settings for using this function please let me know.
date_offset_get
(PHP 5 >= 5.1.0)
date_offset_get — Returns the daylight saving time offset
Description
int date_offset_get
( DateTime $object
)
int DateTime::getOffset
( void
)
Parameters
- object
-
DateTime object.
Return Values
Returns DST offset in seconds on success or FALSE on failure.
date_offset_get
divya at thyminfo dot com
07-Jul-2008 02:54
07-Jul-2008 02:54
