@Slash402 can you explain a bit more the conditions?
You don't have any internet at the place or don't trust it?
How complex is the switching schedule?
Don't get me wrong, but for a simple on off at the same time every day a common cheap timer will provide all you need, usually including a battery backup for the clock.
The problem is, as pointed out, the loss of time if device loses power or restarts e.g. on a watchdog event.
Modifying the switches is a bit risky, usually the pins like GND will have mains potential, so all connections need to be well isolated or need an optocoupler or another galvanic isolation.
If modifying is an option you might add an rtc with battery backup or go for an alternate time source like GPS or a radio time like DCF77 in Germany.
You might also go for an approach with a second device with a stable time source acting as access point for your smart switch and providing the time.
Added after 48 [minutes]:
A "simple complex" setup, like the one I use, would be this (I have it as startup command) to switch on a light "while it's dark outside".
(caution: I had to remove comment lines on LN882H or it would reboot on saving - though it was successfully saved)
// start NTP and set timezone and daylight saving time
startdriver ntp
ntp_timeZoneOfs 1
CLOCK_CalcDST 0 3 1 2 60 0 10 1 3 0
// set geo to later calculate sunrise sunset
ntp_setLatLong 52.5244 13.4105
waitFor NTPState 1
// initially set on or off - relay is on channel 0
// on if it is before sunrise or after sunset
// off if it is after sunrise but before sunset
if $hour*3600+$minute*60+$second-$sunrise<0||$hour*3600+$minute*60+$second-$sunset>0 then setChannel 0 1
if $hour*3600+$minute*60+$second-$sunrise>0&&$hour*3600+$minute*60+$second-$sunset<0 then setChannel 0 0
// repeatedly (every day = 0xff) turn on on sunset / turn off at sunrise
addClockEvent sunset 0xff 31 setChannel 0 1
addClockEvent sunrise 0xff 32 setChannel 0 0