php - date('Z') for a specific date (not for now) -
date('z') - timezone offset in seconds. offset timezones west of utc negative, , east of utc positive.
so offset (this moment of time).
is there way offset in seconds specific time (for ex: 2012-02-17 12:00).
i aware can achieve using datetime class. possible achieve using date() only?
edit:
if server in toronto , it's summer => date('z') => -14400
if server in toronto , it's winter => date('z') => -18000
use strtotime date:
$getdate = '2012-02-17 12:00'; date('z',strtotime($getdate));
Comments
Post a Comment