Page 1 of 1

webcam plugin again

Posted: Tue Apr 26, 2022 7:56 am
by iatros
Hi all
I'd like this setting:
Only record during the day (do not save image between one hour after sunset and one hour before sunrise) to be TWO hours before and after subset.
So I looked at the update Webcam.php and found this:

Line 48:
$sunRiseTimestamp = strtotime(date("Y")."-".date('m')."-".date('d')." ".$sunRiseTodayHours) - (60*60); // subtract one hour to start recording before sunrise
$sunSetTimestamp = strtotime(date("Y")."-".date('m')."-".date('d')." ".$sunSetTodayHours) + (60*60); // add one hour to stop recording after sun set

changing these to 120*120 did not work.
What did I miss?
thx for any help, Martin

Re: webcam plugin again

Posted: Tue Apr 26, 2022 7:52 pm
by Asobig
If you want two hours i think the setting is 120*60 and not 120*120.

Re: webcam plugin again

Posted: Sat Apr 30, 2022 8:12 am
by iatros
Thanks to Asobig -

I tried; it did not work :(
I tried also 2*60*60 without success

Isn't there a php magician around who could help.....?

Re: webcam plugin again

Posted: Sat Jun 25, 2022 4:06 pm
by Oli
I also think that 120*60 should be correct for two hours, but it actually does not work for me either.

Re: webcam plugin again

Posted: Sat Jun 25, 2022 5:26 pm
by davidefa
It should work... but remember to modify the updateWebcam.php script that is the directory load/crons ( I mean the script that is executed by the cron job )

Re: webcam plugin again

Posted: Sun Jun 26, 2022 5:55 am
by Oli
Oli wrote: Sat Jun 25, 2022 4:06 pm I also think that 120*60 should be correct for two hours, but it actually does not work for me either.
This should solve the problem. I've just edited the file in the plugin/webcam directory. Thanks.