# Setting date and time



## dioon (Sep 23, 2010)

FreeBSD 8.1-RELEASE 64bit


```
# date 100923093320
date: illegal time format
usage: date [-jnu] [-d dst] [-r seconds] [-t west] [-v[+|-]val[ymwdHMS]] ... 
            [-f fmt date | [[[[[cc]yy]mm]dd]HH]MM[.ss]] [+format]
```
Tried to set today's date and time,but received this error message.
Date and time I wanted was:
Thursday 23 September 2010. 09.33.20s  this being YYMMDDHHMMSS


```
Sun Oct 10 09:49:57 BST 2010
```
This is what I get with the Date command.


----------



## SirDice (Sep 23, 2010)

Try it without the seconds.


----------



## dioon (Sep 23, 2010)

Thank you SirDice all fine now.


----------



## SirDice (Sep 23, 2010)

If you have Internet access on that machine and your ISP has an NTP server you can also use ntpdate(8) to set the time correctly. Or install net/openntpd to keep it constantly in sync. The ntpd(8) from the base will also work but it's a bit limited.


----------



## fronclynne (Sep 23, 2010)

*Anyone with sisters or a wife knows to mind the period*



			
				dioon said:
			
		

> ```
> # date 100923093320
> date: illegal time format
> usage: date [-jnu] [-d dst] [-r seconds] [-t west] [-v[+|-]val[ymwdHMS]] ...
> ...



What you wanted was `# date 1009230933.20`.


----------

