# Changing date without changing time.



## caesius (Feb 8, 2010)

As the title, can it be done, the date is one day behind, I want something like

```
date -v +1d
```
but I want it to actually adjust the date, not just echo it.

Cheers.


----------



## dennylin93 (Feb 8, 2010)

If you have access to the Internet, just use ntpdate():
`# ntpdate -b 0.pool.ntp.org`


----------



## phoenix (Feb 8, 2010)

From the date(1) page:
`# date 20100207`


----------



## caesius (Feb 8, 2010)

phoenix said:
			
		

> From the date(1) page:
> `# date 20100207`



Thanks, but I already tried that 


```
# date 20100208
date: illegal time format
```

(it's the 8th here..)


----------



## DutchDaemon (Feb 8, 2010)

Set a full date/time then: [cmd=]date 201002081200.00[/cmd] (which is noon, Feb 8, adjust time as as needed)


----------



## caesius (Feb 8, 2010)

DutchDaemon said:
			
		

> Set a full date/time then: [cmd=]date 201002081200.00[/cmd] (which is noon, Feb 8, adjust time as as needed)



Thanks, yeah I was going to do that, but obviously the current time was pulled from somewhere quite accurate (I didn't set it) and I guess I was being a bit OCD having it off by a few seconds...

Thanks anyway


----------



## DutchDaemon (Feb 8, 2010)

If you're running ntpd that will be corrected very quickly.


----------

