Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
wrong time
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
oscarandrea
Apprentice
Apprentice


Joined: 27 Nov 2015
Posts: 177
Location: Italy/Cosenza

PostPosted: Sat Sep 10, 2016 11:07 am    Post subject: wrong time Reply with quote

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 :
Code:
 
└─[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 :)
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43210
Location: 56N 3W

PostPosted: Sat Sep 10, 2016 11:36 am    Post subject: Reply with quote

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.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
oscarandrea
Apprentice
Apprentice


Joined: 27 Nov 2015
Posts: 177
Location: Italy/Cosenza

PostPosted: Sun Sep 11, 2016 9:50 am    Post subject: Reply with quote

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.
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.

thanks a lot :) , 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 :)
Back to top
View user's profile Send private message
fturco
l33t
l33t


Joined: 08 Dec 2010
Posts: 629
Location: Italy

PostPosted: Sun Sep 11, 2016 1:07 pm    Post subject: Reply with quote

You should use NTP to keep your system clock accurate to the second: https://wiki.gentoo.org/wiki/Ntp
Back to top
View user's profile Send private message
oscarandrea
Apprentice
Apprentice


Joined: 27 Nov 2015
Posts: 177
Location: Italy/Cosenza

PostPosted: Sun Sep 11, 2016 7:17 pm    Post subject: Reply with quote

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

thanks :)
Back to top
View user's profile Send private message
jonathan183
Guru
Guru


Joined: 13 Dec 2011
Posts: 309

PostPosted: Sun Sep 11, 2016 7:35 pm    Post subject: Reply with quote

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 ;) ymmv
Back to top
View user's profile Send private message
oscarandrea
Apprentice
Apprentice


Joined: 27 Nov 2015
Posts: 177
Location: Italy/Cosenza

PostPosted: Mon Sep 12, 2016 7:54 am    Post subject: Reply with quote

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?
Back to top
View user's profile Send private message
Buffoon
Veteran
Veteran


Joined: 17 Jun 2015
Posts: 1074
Location: EU or US

PostPosted: Mon Sep 12, 2016 12:13 pm    Post subject: Reply with quote

You want your time be accurate at all times? You need NTP. You can set correct time just once using ntpdate utility.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum