# wrong time

## oscarandrea

hi, after doing a dual boot with Manjaro openrc I noticed that the gentoo time is wrong, I'm Italian ( Europe / Rome ) , the problem is that the time in the bios is wrong , then I would set it via software , I would avoid the time set by " date " because I should add a man I would never be too precise .

i use openrc.

Useful details :

```
 

└─[0] <> cat /etc/timezone 

Europe/Rome

┌─[oscar@GentOscar] - [~] - [2016-09-10 02:52:11]

└─[0] <> sudo emerge --config sys-libs/timezone-data

Password: 

Configuring pkg...

 * Assuming your /etc/localtime symlink is what you want; skipping update.

┌─[oscar@GentOscar] - [~] - [2016-09-10 02:53:16]

└─[0] <> cat /etc/conf.d/hwclock

# Set CLOCK to "UTC" if your Hardware Clock is set to UTC (also known as

# Greenwich Mean Time).  If that clock is set to the local time, then

# set CLOCK to "local".  Note that if you dual boot with Windows, then

# you should set it to "local".

clock="local"

# If you want the hwclock script to set the system time (software clock)

# to match the current hardware clock during bootup, leave this

# commented out.

# However, you can set this to "NO" if you are running a modern kernel

# and using NTP to synchronize your system clock.

clock_hctosys="YES"

# If you do not want to set the hardware clock to the current system

# time (software clock) during shutdown, set this to no.

clock_systohc="YES"

# If you wish to pass any other arguments to hwclock during bootup,

# you may do so here. Alpha users may wish to use --arc or --srm here.

#clock_args=""

┌─[oscar@GentOscar] - [~] - [2016-09-10 02:56:35]

└─[1] <> sudo rc-service hwclock status       

Password: 

 * status: started

┌─[oscar@GentOscar] - [~] - [2016-09-10 03:06:55]

└─[0] <> 

```

thanks  :Smile: 

----------

## NeddySeagoon

oscarandrea,

All your operating systems need to agree ot the setting of BIOS time.

Its either local, if its set to your wristwatch or UTC, if its UTC.

Both ways work.  You must use   local if Windows is involved.

All your Linux systems need to use the same setting in/etc/timezone.  I have Europe/London.

You will have Europe/Rome (no spaces).

Its a good idea if you use the same version of timezone-data everywhere too. As long as all versions have the same data for  Europe/Rome, you will be good. 

On older systems, /etc/localtime was a symbolic link to your timezone file.  This is considered a bad thing today and one of the startup services copies your timezone file to /etc/localtime.

That's how the timezone file in use is updated after you get a new timezone-data package.  

Should clock="local" be clock="UTC"

Compare the settings with your Manjaro install.

If you allow the BIOS hardware clock to be updated on shutdown, that process may have set the BIOS to a time other than the time you were expecting because your operating systems do not agree on what BIOS time should be.

----------

## oscarandrea

 *NeddySeagoon wrote:*   

> oscarandrea,
> 
> All your operating systems need to agree ot the setting of BIOS time.
> 
> Its either local, if its set to your wristwatch or UTC, if its UTC.
> ...

 

thanks a lot  :Smile:  , I eventually solved by changing the time manually by the bios , but unfortunately I can not get the maximum precision of seconds , the strange thing is that if in spite of the configuration files has put local and not utc changing the time of the bios has also changed the schedule of gentoo .

I wondered if I had to remove Manjaro ( I had only installed to see if indeed openrc functioned well in it ) , how should I configure the gentoo file to make sure that the timetable is really accurate? because now I have modified the hand clockwise in the bios and I do not precesione in seconds .

Thanks a lot again  :Smile: 

----------

## fturco

You should use NTP to keep your system clock accurate to the second: https://wiki.gentoo.org/wiki/Ntp

----------

## oscarandrea

 *fturco wrote:*   

> You should use NTP to keep your system clock accurate to the second: https://wiki.gentoo.org/wiki/Ntp

 

thanks  :Smile: 

----------

## jonathan183

 *NeddySeagoon wrote:*   

> You must use   local if Windows is involved.

 

actually you can use either with Windows see Time - ArchWiki

initial setup may have been a bit easier using local time ... but I use utc on all the systems I setup  :Wink:  ymmv

----------

## oscarandrea

so even though eliminating things Manjaro to have a specific time do I have to create a service (ntp) with openrc ? There is no other solution?

----------

## Buffoon

You want your time be accurate at all times? You need NTP. You can set correct time just once using ntpdate utility.

----------

