note 83429 added to function.date

From: Date: Mon, 26 May 2008 05:37:06 +0000
Subject: note 83429 added to function.date
Groups: php.notes 
Request: Send a blank email to php-notes+get-139777@lists.php.net to get a copy of this message
Found this helpful when converting unix dates for use with the ical file format. // Converts a unix timestamp to iCal format (UTC) - if no timezone is // specified then it presumes the uStamp is already in UTC format. // tzone must be in decimal such as 1hr 45mins would be 1.75, behind // times should be represented as negative decimals 10hours behind // would be -10 function unixToiCal($uStamp = 0, $tzone = 0.0) { $uStampUTC = $uStamp + ($tzone * 3600); $stamp = date("Ymd\THis\Z", $uStampUTC); return $stamp; } ---- Server IP: 203.88.112.146 Probable Submitter: 203.206.176.162 ---- Manual Page -- http://www.php.net/manual/en/function.date.php Edit -- https://master.php.net/note/edit/83429 Del: integrated -- https://master.php.net/note/delete/83429/integrated Del: useless -- https://master.php.net/note/delete/83429/useless Del: bad code -- https://master.php.net/note/delete/83429/bad+code Del: spam -- https://master.php.net/note/delete/83429/spam Del: non-english -- https://master.php.net/note/delete/83429/non-english Del: in docs -- https://master.php.net/note/delete/83429/in+docs Del: other reasons-- https://master.php.net/note/delete/83429 Reject -- https://master.php.net/note/reject/83429 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#139777) next »