PC & IT SUPPORT MADE EASY FORUM
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Setting the date in Linux from the CLI

Go down

Setting the date in Linux from the CLI Empty Setting the date in Linux from the CLI

Post by jamied_uk 23rd May 2020, 20:15

date --set=”20200524 20:12:00”

The above command is simple 2020 is the year then the month o5 (for example) then the date 05 (example) then the time in 24 hours! (20 for 8 pm for example).

Without the correct date web pages wont work, update commands wont work nothing will work properly! you need the correct date!
jamied_uk
jamied_uk
Admin

Posts : 2950
Join date : 2010-05-09
Age : 41
Location : UK

https://jnet.sytes.net

Back to top Go down

Setting the date in Linux from the CLI Empty Re: Setting the date in Linux from the CLI

Post by jamied_uk 24th May 2020, 03:04

Script to do this the British Way!!!

Code:
#!/bin/bash
#(c) J~Net 2020
# ./run.sh
#
# https://jnet.forumotion.com/t1692-setting-the-date-in-linux-from-the-cli#2615
#
# Website:
# jnet.sytes.net
#
echo "Enter Day In Numbers:"
read day
echo "Enter Month In Numbers: Example: 05 For May"
read month
echo "Enter Year In Numbers:"
read year
echo "Enter Time In 24 Hour Format: Example: 20:04"
read time
date --set="$year$month$day $time"
jamied_uk
jamied_uk
Admin

Posts : 2950
Join date : 2010-05-09
Age : 41
Location : UK

https://jnet.sytes.net

Back to top Go down

Setting the date in Linux from the CLI Empty Re: Setting the date in Linux from the CLI

Post by jamied_uk 25th May 2020, 18:16

More useful Links

nohypenolies.com/2020/02/automatic-date-and-time-enable-kali.html

List of NTP Time Servers

google.com/search?client=firefox-b-e&q=london+ntp+server


Daylight Savings Time (DST)

support.microfocus.com/kb/doc.php?id=3655154#
jamied_uk
jamied_uk
Admin

Posts : 2950
Join date : 2010-05-09
Age : 41
Location : UK

https://jnet.sytes.net

Back to top Go down

Setting the date in Linux from the CLI Empty Re: Setting the date in Linux from the CLI

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum