I work at a manufacturing plant and we use raspberry pis for videos on a schedule. We use Screenly to schedule when certain videos will play back but currently I also need to manually correct the date and time.
I do have a script that we run whenever we are configuring a new raspberry pi that take care of a lot of things for us like changing the pi user password, enabling ssh, changing the hostname etc. I would like for this on boarding script to also handle correcting the date and time. So far I have gotten the timezone to be corrected but the time is still an hour off and the date is WAY OFF. I am configuring a rpi today and the date says april 27, 2019. As a part of the script I am installing ntpdate (a solution I found online) but it does not seem to be working.
Does anyone know how I could do this? I know we could use raspi-config but I want us to only to have to run this script and everything else is taken care of.