How to Set Date, Time, Zone on linux sever
Thursday, January 14, 2016
How to Set Date, Time, Zone on linux server ?
To Check current date and time Use Date Command :-
date
Fri June 14 21:22:41 CET 2012
How To Set Date:-
Use below comand to set new data and time:
date set="STRING"
example like :
date -s "28 May 2012 17:00:00"
How To Set Time:-
Use below Command To set time:
date +%T -s "06:11:16"
Where:
06: Hour (hh)
11: Minute (mm)
16: Second (ss)
Change timezone :-
/etc /localtime file has details about time zone. The Zone information file is located at /usr/share/zoneinfo and this depends on your distribution.
cd /etc/
ln -sf /usr/share/zoneinfo/EST localtime
If you want to set to IST (Asia/Calcutta):
ln -sf /usr/share/zoneinfo/Asia/Calcutta localtime
To Check current date and time Use Date Command :-
date
Fri June 14 21:22:41 CET 2012
How To Set Date:-
Use below comand to set new data and time:
date set="STRING"
example like :
date -s "28 May 2012 17:00:00"
How To Set Time:-
Use below Command To set time:
date +%T -s "06:11:16"
Where:
06: Hour (hh)
11: Minute (mm)
16: Second (ss)
Change timezone :-
/etc /localtime file has details about time zone. The Zone information file is located at /usr/share/zoneinfo and this depends on your distribution.
cd /etc/
ln -sf /usr/share/zoneinfo/EST localtime
If you want to set to IST (Asia/Calcutta):
ln -sf /usr/share/zoneinfo/Asia/Calcutta localtime
0 comments:
Post a Comment