Last active
January 13, 2023 15:14
-
-
Save alirezazadeh77/a1e7db41eec45343a8ffd31812cbe1c1 to your computer and use it in GitHub Desktop.
change linux date time to a specific time
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# example: | |
# set os time to 2022-12-15 | |
# ./change_time.sh 2022-12-15 | |
TIME=$1 | |
timedatectl set-ntp 0 | |
timedatectl set-time $TIME |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment