• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Timezone issue

michael_n

New Member


Messages: 11

#1
Hello all,

I have been using Linux for years but I am new to FreeBSD.

I have set up a few VMs but am having an issue with the time on one of them. I set it for EST in the US but it is showing as five hours ahead. I tried running ntpd -q but to no avail. I re did the time zone a few times with tzsetup, still no joy. I added the following to my rc.conf file and rebooted, no joy:

Code:
ntpd_enable="YES"
ntpdate_enable="YES"
I replaced the given servers in ntp.conf with the following, no joy:

Code:
server 0.north-america.pool.ntp.org
server 1.north-america.pool.ntp.org
server 2.north-america.pool.ntp.org
server 3.north-america.pool.ntp.org
Last thing I tried was disabling the setting in VM Ware to sync time from host but that yielded to change as well. I am tempted to just nuke it and start over but I'd like to know what is going on here. Any suggestions would be very appreciated.

Thanks, Mike
 

Oko

Daemon

Thanks: 717
Messages: 1,593

#2
Let me guess. You live in Central Time zone? FIve hours is the difference between your time zone and Universal Coordinate Time (UTC) which is roughly equal to Greenwich London. You also run Windows as your primary OS.
 

Oko

Daemon

Thanks: 717
Messages: 1,593

#4
I am not much of a MAC user but I would not be surprised that they switched to local time as the system time. That would be my first guess. I use only KVM in production so I am not familiar with the virtualization technology you are using. Sorry for the noise.
 

J65nko

Well-Known Member

Thanks: 127
Messages: 453

#5
During the install you are asked whether the clock of your computer is set to local time or UTC. If you answered wrongly you will have a time difference ;)

I have the following entry in /etc/crontab

Code:
# Adjust the time zone if the CMOS clock keeps local time, as opposed to
# UTC time.  See adjkerntz(8) for details.
#1,31  0-5  *  *  *  root  adjkerntz -a
@reboot  root  ntpdate -b pool.ntp.org
You also could install net/openntpd, the OpenBSD network time daemon, which has privilege separation.
 

michael_n

New Member


Messages: 11

#6
During the install you are asked whether the clock of your computer is set to local time or UTC. If you answered wrongly you will have a time difference ;)

I have the following entry in /etc/crontab

Code:
# Adjust the time zone if the CMOS clock keeps local time, as opposed to
# UTC time.  See adjkerntz(8) for details.
#1,31  0-5  *  *  *  root  adjkerntz -a
@reboot  root  ntpdate -b pool.ntp.org
You also could install net/openntpd, the OpenBSD network time daemon, which has privilege separation.
I think you're right. My concern is why this wasn't corrected with any of the changes I made? I was able to manually set the date with date but I feel like it should have sunk up online after the changes were made.
 

gqgunhed

Active Member

Thanks: 35
Messages: 135

#7
Maybe try running tzsetup within you virtualized FreeBSD and reset your time zone settings. As J65nko mentioned above try switching "Is this machine's CMOS clock set to UTC?" between Yes and No.
As the (type 2) hypervisor takes the time from the underlying operating system this can be the knob to adjust.
 

joaoluizmf

New Member


Messages: 4

#8
During the install you are asked whether the clock of your computer is set to local time or UTC. If you answered wrongly you will have a time difference ;)

I have the following entry in /etc/crontab

Code:
# Adjust the time zone if the CMOS clock keeps local time, as opposed to
# UTC time.  See adjkerntz(8) for details.
#1,31  0-5  *  *  *  root  adjkerntz -a
@reboot  root  ntpdate -b pool.ntp.org
You also could install net/openntpd, the OpenBSD network time daemon, which has privilege separation.
Thanks! This solved my problem.
 
Top