How to change system date in Linux


This morning i need to change system date in linux to test one of my application. Too bad i’m not familiar with command line command linux. So after googling for sometime, i manage to find out how to change system date in Linux using command line.
To change system date in linux, type:-
$date MMDDhhmmYYYY.ss
For example: i want to change my system date to Jun 29 2006, 3.30pm, i will type:-
$date 062915302006
It’s simple ![]()
Note:
MM – month
DD – day
YYYY – year
hh – hour is based on 24 hour
mm – minutes
ss – seconds
Tags: change date linux, change system date, linux change date, linux change system date, modify system date, system date, system date linux
Posted at November 10th, 2006 by chua
If you think this article helps you to solve your problem and clear your headache, feel free to buy me a drink :)



May 3rd, 2007 at 8:21 pm
also, try:
date -s MMDDhhmmYYYY.ss
-s = set
–
October 12th, 2008 at 2:19 pm
Which command should i use to change the session date without using the root user-id?