Site Tools


linux:raspberry:raspbian:scripts:clock

This is an old revision of the document!


Date and Time Script

This script can be used to change the date and time if your Raspberry is not connected to a network or timeserver. To do this, you need to enter the current date and time in the correct format. It will refresh after some seconds.

#!/bin/sh
 
#Lunetikk | 03.04.2014 | Change date and time
 
 
read -p "Insert date like YYYY-MM-DD:" DATE
read -p "Insert time like HH:MM:SS:" TIME
 
sudo date -s "$DATE $TIME" 
sudo fake-hwclock



linux/raspberry/raspbian/scripts/clock.1511971159.txt.gz · Last modified: 2017/11/29 16:59 (external edit)