I always manage to get myself into weird issues… I have this (pretty old) wrt54g router that works well with dd-wrt v3.0-r34311 vpn release […] The apartment is located on a small mountain and electricity is not exactly stable, from times to times power goes down and comes back up. And I noticed the openvpn link sometimes fails to reconnect.
After some debugging, I finally noticed that for some reason, the enabled NTP feature sometimes do not fetch the current time, and so the router’s date is stuck to epoch. In order to be sure the access point gets the right time, I took a different approach, when booting, it will fetch current time online and setup date accordingly.
nginx ssi‘s module has interesting variables for this particular use, namely date_local and date_gmt.