getOffset() public méthode

Get the offset from current timezone to the UTC timezone in seconds.
public getOffset ( ) : integer
Résultat integer The offset from current timezone to UTC in seconds.
 public function testGetOffset()
 {
     $ny = new DateTimeObject("now", 'America/New_York');
     if ($ny->getOffset() != -18000 && $ny->getOffset() != -14400) {
         // based on daylight saving time
         $this->assertFalse(true);
     }
 }