PHP
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

date_parse> <date_modify
Last updated: Fri, 18 Jul 2008

view this page in

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.



add a note add a note User Contributed Notes
date_offset_get
divya at thyminfo dot com
07-Jul-2008 07:54
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_parse> <date_modify
Last updated: Fri, 18 Jul 2008
 
 
show source | credits | sitemap | contact | advertising | mirror sites