1

I'm running a Raspberry Pi with two cameras attached to it, capturing photos every 5 minutes 24/7 for daily timelapse videos.
What I'm trying to accomplish right now, is an option to filter out the night photos. The photos are stored in the format YYYY-mm-dd_HHMM.jpg > 2016-12-13_0730.jpg.
I've been searching for a function like the mysql statement "SELECT * FROM dir BETWEEN 0630 AND 1800 ORDER BY time DESC" and write the output in a textfile for further editing.

Any ideas ?

Thanks in advance.

EDIT: One more thing to mention ..
I'm using date_sunrise and date_sunset to calculate the times for the current day, so the output from date_sunrise(time(), SUNFUNCS_RET_STRING, $lat, $long, $zenith, $offset) would be something like 06:59 and date_sunset(time(), SUNFUNCS_RET_STRING, $lat, $long, $zenith, $offset) would return 16:02. So that the script is timezone and season independent.

1_am_r00t
  • 55
  • 9
  • Possible duplicate of [php glob number range in filename](http://stackoverflow.com/questions/35779114/php-glob-number-range-in-filename) – cmorrissey Dec 13 '16 at 21:09
  • 1
    Solution found here: http://stackoverflow.com/questions/24084631/find-files-modified-between-two-dates-using-php – 1_am_r00t Dec 13 '16 at 23:08

0 Answers0