# UTC time setting



## topher (Dec 10, 2009)

I must have selected "yes" when asked if my hardware clock was set to UTC during post-installation. Is there a file that I can edit to change that selection to local time, or do i need to re-install selecting "no" this time?


----------



## mickey (Dec 10, 2009)

Creating an empty file /etc/wall_cmos_clock should do the trick, and indicate to the system, that your CMOS clock has local time, rather than UTC set:

`# touch /etc/wall_cmos_clock`

See also adjkerntz(8).


----------



## stoomaroo (Feb 23, 2010)

*The date command might also be a good alternative*

The 
	
	



```
date yymmddhhmms
```
 command might also be an alternative for you.

Use 
	
	



```
date
```
 by itself to determine if your time zone is correct.  If it is, then simply change the time (as the superuser):


```
date 1642
```

would change it to 4:42 PM

If your timezone is incorrect, you might want to take the opportunity to learn how to change it as well.

This might help:
http://www.cyberciti.biz/faq/howto-set-date-and-time-timezone-in-freebsd/

While you're at it, if you can setup the ntp service to automatically sync time (always good practice) it should save you sync problems as well -- entirely optional though.

-stoomaroo


----------



## SirDice (Feb 23, 2010)

topher said:
			
		

> I must have selected "yes" when asked if my hardware clock was set to UTC during post-installation. Is there a file that I can edit to change that selection to local time, or do i need to re-install selecting "no" this time?



Just run tzsetup(1).


----------



## achix (Feb 23, 2010)

A user friendlier way is to run `# sysinstall`.
Also, a very good idea is running ntpd(8), to keep correctly your system's current date/time. That's done by enabling ntpd_enable="YES" in /etc/rc.conf .


----------



## SirDice (Feb 23, 2010)

achix said:
			
		

> A user friendlier way is to run `# sysinstall`.



Which runs tzsetup(1). Do yourself a favor and use sysinstall only for the initial installation and nothing else.


----------



## achix (Feb 23, 2010)

SirDice said:
			
		

> Which runs tzsetup(1). Do yourself a favor and use sysinstall only for the initial installation and nothing else.


1) where does it write that sysinstall is bad *per se* for post installation work (it even advertises this in the head menu)
2) where does it write (or who says and for what) that sysinstall is bad *as a practice*
3) i fail to see how i would favor my self by not running sysinstall :e
4) i haven't run sysinstall for ages, if this is your concern


----------

