Re: AI Written Bash Script

Liste des GroupesRevenir à cs raspberry-pi 
Sujet : Re: AI Written Bash Script
De : josef (at) *nospam* invalid.invalid (Josef Möllers)
Groupes : comp.sys.raspberry-pi
Date : 12. Dec 2024, 14:35:32
Autres entêtes
Message-ID : <ls0754Fr9qnU1@mid.individual.net>
References : 1
User-Agent : Mozilla Thunderbird
On 12.12.24 13:43, DrStevenStrange wrote:
Ok - don't laugh
 My coding skills are pitiful so I asked my resident Ai to write a bash script to call a webcam script (I did write this one) only between sunrise and sunset. it produced this and it works! My question is - how can I amend the script so it starts 30 minutes BEFORE sunrise and stops 30  Minutes after?
[...]

SUNRISE_EPOCH=$(date -d "$SUNRISE" +%s)
SUNSET_EPOCH=$(date -d "$SUNSET" +%s)
CURRENT_EPOCH=$(date +%s)
Since you already have the date/time in seconds since the epoch, just subtract 30 seconds for BEFORE and add 30 seconds for AFTER
Josef

Date Sujet#  Auteur
12 Dec 24 * AI Written Bash Script7DrStevenStrange
12 Dec 24 +- Re: AI Written Bash Script1Josef Möllers
12 Dec 24 +- Re: AI Written Bash Script1Josef Möllers
12 Dec 24 +* Re: AI Written Bash Script2Lawrence D'Oliveiro
13 Dec 24 i`- Re: AI Written Bash Script1DrStevenStrange
12 Dec 24 `* Re: AI Written Bash Script2mm0fmf
17 Dec01:08  `- Re: AI Written Bash Script1f6k

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal