note 70476 added to function.mktime
| From: | splogamurugan at gmail dot com | Date: | Wed, 18 Oct 2006 12:29:29 +0000 |
| Subject: | note 70476 added to function.mktime | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-118684@lists.php.net to get a copy of this message | ||
This function will check the current time is in DST or not for europe countries.
function chkIsDSTForEurope()
{
$year=date('Y');
$start_date = date('Y-m-d', strtotime('-1 week sunday', strtotime("April
1, $year"))+ 43200).' 12:59:59';
$end_date = date('Y-m-d', strtotime('-1 week sunday', strtotime("November
1, $year"))+ 43200).' 12:59:59';
$sql=' SELECT now() > \''.$start_date.'\' AND
now()<\''.$end_date.'\' dst ';
$resource = mysql_query($sql);
$row=mysql_fetch_array($resource);
return $row['dst'];
}
Here,
$start_date = last sunday date for march.
$end_date = last sunday date for month October
----
Server IP: 203.199.124.111
Probable Submitter: 61.8.145.170
----
Manual Page -- http://www.php.net/manual/en/function.mktime.php
Edit -- https://master.php.net/note/edit/70476
Del: integrated -- https://master.php.net/note/delete/70476/integrated
Del: useless -- https://master.php.net/note/delete/70476/useless
Del: bad code -- https://master.php.net/note/delete/70476/bad+code
Del: spam -- https://master.php.net/note/delete/70476/spam
Del: non-english -- https://master.php.net/note/delete/70476/non-english
Del: in docs -- https://master.php.net/note/delete/70476/in+docs
Del: other reasons-- https://master.php.net/note/delete/70476
Reject -- https://master.php.net/note/reject/70476
Search -- https://master.php.net/manage/user-notes.php