usually a good idea for clients like PuTTY, since these are sent by default
in the very first packet even before user types anything else
also restore iac+eof handling, which call close() on the stream
resolve#2563resolve#2606
allow just "UTC", "Monday", "05-01", etc.
clarify webui paragraph and mention KEYWORD as an element
ignore sunrise and sunset keywords when sun module is disabled
move all of parsing to time module, test whether combined match works
certain actions need to happen when
- starting restore()
- switching date within restore()
- stopping restore()
pretty good fit for an object and raii. so, using context struct to handle
sun{rise,set} initialization and per-schedule time match updates
sun{rise,set} event happens on a specific date, make sure it is also checked
fix double action trigger by comparing minutes, not raw timestamp seconds
experimenting with 'invalid state' i.e. when timestamp was not generated
include restore logic in tests, as code now lives in .ipp
- allow to specify year, month and day in addition to weekdays and time
2024-05-15 Monday 00:00 <=> runs *only* on May 15th 2024
year is optional, 05-15 <=> any May 15th on any year
- last day of month, Nth week, reversed day-of-month (starting from last)
*-W1 00:00 <==> run at midnight on the first week of month
01-L2 6:00 <==> run at six, but only on the second to last day of January
05-L 12:00 <==> run at twelve, but only on the last day of May
- allow multiple time settings per schedule specified as ranges
12,13,14:00 <=> run at 12:00, 13:00 and 14:00
Friday..Sunday 12:00 <=> run at 12:00, but only only on Friday, Saturday and Sunday
- similar to weekdays default, allow asterisk (*) to avoid using exact value
*:30 <=> every hour at 30 minutes
10:* <=> every minute at 10 o'clock
- repetition value for more control over steps between runs
*:0/5 <==> every 5 minutes, starting with 0
0/2:00 <==> every 2 hours, starting with 0
- rework api and settings storage to use 1 key for time setting
type and 'enabled' state moved into one
- implement sunrise & sunset suggested in #2417
should be specified instead of HH:MM
note that there is an issue with overload resolution, since template
requires serilize() to be available *before template* and not at the
point of the caller.
serialize converted to template should fix it, though