Shutdown Timer Classic is a small little Windows app that allows you to set a timer which will shutdown, restart, hibernate, sleep or lock your PC. It is completely free and open-source and does not use the internet. Feel free to contribute to the project on GitHub. Please also report any problems there by creating an issue.
Detailed information as well as the source code can be found on GitHub:
WARNING: Applications will be forcefully closed when using the Shutdown Timer in non-graceful mode. You might experience data loss if applications are forced to exit before having finished their operation. Please set the timer with enough headroom. You are responsible for any damage to your system or data!