Open UD-37 opened 2 years ago
Try using tm_min:
ts = time.localtime()
if ts.tm_hour not in (0,6,12,18) or ts.tm_min != 0:
logdbg("This is not hour to tweet: %d" % ts.tm_hour)
return
That should only tweet at 0:00, 06:00, 12:00 or 18:00. I'm not certain if this will work if the archive interval is longer than 1 minute though
Is it possible to post weather data on a Twitter account at fixed time (like 0h00, 6h00, 12h00 and 18h00) ?
Here is the code I have (from WeeWX Google-group), but if WeeWX starts at 4H31: data are posted on Twitter at 6H35, 12H35, 18H35 then 0H35. So, is there a way to include minutes in the process ?