Setting the date and time on the Beaglebone Black

The Beaglebone Black doesn't have a real time clock or battery back-up, so it will lose the time and date when it is rebooted. This causes problems when installing software or accessing sites via https (when the certificate isn't valid yet because your Beaglebone still thinks it's the year 2000)....