<project version="4">
<component name="ChangeListManager">
<list default="true" id="352ce63a-b52a-41a2-979b-becda7920939" name="Default" comment=".">
+ <change afterPath="$PROJECT_DIR$/scripts/backyard.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/scripts/lib/weatherstation.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/weatherstation.php" afterDir="false" />
</list>
<workItem from="1575646996012" duration="72000" />
<workItem from="1575647085982" duration="668000" />
<workItem from="1576479934693" duration="252000" />
- <workItem from="1576480199671" duration="1812000" />
- </task>
- <task id="LOCAL-00203" summary=".">
- <created>1565944175034</created>
- <option name="number" value="00203" />
- <option name="presentableId" value="LOCAL-00203" />
- <option name="project" value="LOCAL" />
- <updated>1565944175034</updated>
+ <workItem from="1576480199671" duration="2743000" />
</task>
<task id="LOCAL-00204" summary=".">
<created>1566128716085</created>
<option name="project" value="LOCAL" />
<updated>1575647196441</updated>
</task>
- <option name="localTasksCounter" value="252" />
+ <task id="LOCAL-00252" summary=".">
+ <created>1576492913475</created>
+ <option name="number" value="00252" />
+ <option name="presentableId" value="LOCAL-00252" />
+ <option name="project" value="LOCAL" />
+ <updated>1576492913476</updated>
+ </task>
+ <option name="localTasksCounter" value="253" />
<servers />
</component>
<component name="TodoView">
<screen x="0" y="0" width="2560" height="1040" />
</state>
<state x="960" y="247" key="#com.intellij.openapi.updateSettings.impl.PluginUpdateInfoDialog/0.0.2560.1040@0.0.2560.1040" timestamp="1576479992407" />
- <state x="701" y="127" key="CommitChangelistDialog2" timestamp="1575647157027">
- <screen x="0" y="0" width="1920" height="1160" />
+ <state x="935" y="114" key="CommitChangelistDialog2" timestamp="1576492902061">
+ <screen x="0" y="0" width="2560" height="1040" />
</state>
<state x="701" y="127" key="CommitChangelistDialog2/0.0.1920.1160@0.0.1920.1160" timestamp="1575647157027" />
- <state x="935" y="114" key="CommitChangelistDialog2/0.0.2560.1040@0.0.2560.1040" timestamp="1575617704022" />
+ <state x="935" y="114" key="CommitChangelistDialog2/0.0.2560.1040@0.0.2560.1040" timestamp="1576492902061" />
+ <state x="1114" y="443" key="NewPhpFileDialog" timestamp="1576493932196">
+ <screen x="0" y="0" width="2560" height="1040" />
+ </state>
+ <state x="1114" y="443" key="NewPhpFileDialog/0.0.2560.1040@0.0.2560.1040" timestamp="1576493932196" />
<state x="976" y="343" key="com.intellij.ide.util.TipDialog" timestamp="1576480418011">
<screen x="0" y="0" width="2560" height="1040" />
</state>
function isDay()
{
$time = new DateTime('now', new DateTimeZone('Europe/Paris'));
+ $timestamp = $time->getTimestamp();
+ $offset = $time->getOffset() / 3600;
- $sunrise = date_sunrise($time->getTimestamp(), SUNFUNCS_RET_TIMESTAMP, LATITUDE, LONGITUDE, 90, $time->getOffset() / 3600);
- $sunset = date_sunset($time->getTimestamp(), SUNFUNCS_RET_TIMESTAMP, LATITUDE, LONGITUDE, 90, $time->getOffset() / 3600);
+ $sunrise = date_sunrise($timestamp, SUNFUNCS_RET_TIMESTAMP, LATITUDE, LONGITUDE, 90, $offset);
+ $sunset = date_sunset($timestamp, SUNFUNCS_RET_TIMESTAMP, LATITUDE, LONGITUDE, 90, $offset);
- if ($time > $sunset && $sunrise < $sunset) {
+ if ($timestamp > $sunset && $sunrise < $sunset) {
$sunrise += 3600 * 24;
}
- if ($time < $sunrise || $time > $sunset) {
+ if ($timestamp < $sunrise || $timestamp > $sunset) {
return false;
}
return true;