note 113797 added to function.date-sunrise
| From: | scottix at gmail dot com | Date: | Wed, 04 Dec 2013 00:46:11 +0000 |
| Subject: | note 113797 added to function.date-sunrise | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-197733@lists.php.net to get a copy of this message | ||
If you are working in multiple timezones getting the offset from a date is a little tricky because
you need it in hours.
<?php
$time = new DateTime('now', new DateTimeZone('America/Los_Angeles'));
date_sunrise(
$time->getTimestamp(),
SUNFUNCS_RET_TIMESTAMP,
38.4,
-9,
90,
$time->getOffset() / 3600
);
----
Server IP: 192.41.45.150
Probable Submitter: 96.238.221.250
----
Manual Page -- http://php.net/manual/en/function.date-sunrise.php
Edit -- https://master.php.net/note/edit/113797
Del: integrated -- https://master.php.net/note/delete/113797/integrated
Del: useless -- https://master.php.net/note/delete/113797/useless
Del: bad code -- https://master.php.net/note/delete/113797/bad+code
Del: spam -- https://master.php.net/note/delete/113797/spam
Del: non-english -- https://master.php.net/note/delete/113797/non-english
Del: in docs -- https://master.php.net/note/delete/113797/in+docs
Del: other reasons-- https://master.php.net/note/delete/113797
Reject -- https://master.php.net/note/reject/113797
Search -- https://master.php.net/manage/user-notes.php