VectorLinux

The nuts and bolts => Technical General => Topic started by: wigums on August 01, 2013, 08:36:18 am

Title: 7.1 system time
Post by: wigums on August 01, 2013, 08:36:18 am
id like to bring issue to the exclusion of a time configuration option in 7.1.  its my understanding that no option will be given during install to set time and no info will be made available to the end user about the possibility of their time not being set correctly.

time is rather important. i never even noticed mine was wrong until i noticed gmail had the wrong timestamps in my emails. its easy enough to fix, for example i did

ln -s /usr/share/zoneinfo/US/Michigan localtime  && hwclock -s

but why should the end user have to go searching and sorting to figure out how to set the time correctly when in my opinion it should be set during install. or atleast have a note popup immediately after install instructing how to do so
Title: Re: 7.1 system time
Post by: stretchedthin on August 01, 2013, 09:18:57 am
bump! From a user experience perspective this ranks high for me.
Title: Re: 7.1 system time
Post by: wigums on August 01, 2013, 10:20:18 am
rbistolfi told me there was supposed to be some info/tutorial links on the desktop after installation, however they do not point to the proper docs. on my "desktop" they are as such.....

vecotr tutorials opens browser homepage
vector docs opens http://www.vectorlinux.com/
and the forums icon opens the forums main page (im guessing this one is correct?)
Title: Re: 7.1 system time
Post by: retired1af on August 03, 2013, 04:42:57 am
Every single 7.1 beta (and alpha) I've installed has taken the system time from my machine and set it accordingly within the OS. It's not doing this on your machine?
Title: Re: 7.1 system time
Post by: wigums on August 07, 2013, 01:24:07 pm
no it is not. i did not even notice the issue actually until i got an email from my mother with a timestamp of 2 am and shes just not awake that late.
my clock time was correct but my sys time was off by many hours
Title: Re: 7.1 system time
Post by: wigums on August 07, 2013, 01:34:39 pm
im not sure if this post is related or not but its worth a mention

http://forum.vectorlinux.com/index.php?topic=17719.0

vasm-legacy would not set my time either, however on all other distros of my multi-boot laptop the time is correct.
note: its the sys time thats off, not the clock time (but clock time is as relevant as your wristwatch in this instance)
Title: Re: 7.1 system time
Post by: roarde on August 07, 2013, 03:26:11 pm
grep "localtime\|UTC" /etc/hardwareclock
/sbin/vzoneset      at "localtime or UTC" choice, choose the one that did NOT appear when the above command was run.

I discovered this by asking my wristwatch, which relevantly replied, "Ask the clock."
Title: Re: 7.1 system time
Post by: roarde on August 07, 2013, 03:31:51 pm
Because of the many possibilities provided by multiple OS installs (whether concurrently or serially), installers must make provision to view and change the timezone assumed to be the one used by the hardware clock. That's not to say that asking the user is the right answer.
Title: Re: 7.1 system time
Post by: wigums on August 07, 2013, 08:16:35 pm
roarde, if you go back and read the first post i made in this thread you would see that i solved my time issue and wasnt asking for help to solve it. actually i gave a solution for others who may have this issue as well

 the issue is there was no option to set the time during install and i was told there would be no option in the final release. further more if you look through the forums you would see i am not the only one who has had a sys time issue
Title: Re: 7.1 system time
Post by: wigums on August 07, 2013, 08:21:11 pm
why wouldn't asking the user be the right answer as they know what time it is better than the installer?
Title: Re: 7.1 system time
Post by: sledgehammer on August 08, 2013, 08:13:03 am
This discussion is very interesting.  I have not noticed any time issues when loading VL 7, but will pay more attention next time.  It would be great if there were some way to, by default, sync the VL time with real time, so the various programs that depend on accurate time would work better.  For example, if ETM properly reminds me to be somewhere at 10:00 am, but my VL clock is wrong, due to computer time creep or whatever, I will be either too early or late.  Perhaps just a warning, whenever the the difference between VL time and real time reached a certain point, would do.
Title: Re: 7.1 system time
Post by: wigums on August 08, 2013, 09:37:50 am
another way (my preferred method) for keeping system time accuracy is to run ntpd

http://www.ntp.org/
Title: Re: 7.1 system time
Post by: sledgehammer on August 09, 2013, 12:32:00 am
Thanks,

My problem is I forget to go to root and run ntpd.  I set it up a year or two ago and it still seems to work when I remember.
Title: Re: 7.1 system time
Post by: retired1af on August 09, 2013, 05:22:30 am
I dug a bit deeper and I see what you're talking about. Wierd. Clock was showing correct time, but internally, it was buggered up. We'll have to address this during the installation process. :)
Title: Re: 7.1 system time
Post by: StrayBit on August 09, 2013, 06:28:14 am
This thread has been surprising to me.  Every installation that I've used from 5.9 through 7.0 allows the installer to select the time zone and, I believe, whether the clock is local or UTC.

Also, 7.1 is still in testing stage.
Title: Re: 7.1 system time
Post by: wigums on August 09, 2013, 09:15:08 am
sledgehammer, you can always run a cron job for ntp. once a day should suffice
Title: Re: 7.1 system time
Post by: roarde on August 10, 2013, 01:30:46 pm
why wouldn't asking the user be the right answer as they know what time it is better than the installer?

Because in too many cases, the user's idea of the time is not as good as the installer's, and the installer's isn't right either. As you point out, a lot of installations have problems due to this, and prior to 7.1, the installer has been asking the user, period.

There will be problems here until UTC is universally accepted and understood. Becuase I boot Windows once a month or so (and won't do the registry hack), my hardware clock has to be set to localtime, which is a bad idea. Oh well. It's the "least bad" idea if you're booting Windows sometimes. UTC is the only reference for hardware clock that would never need to be changed, should one be able to use it.

The best we can do for now:
A slightly more intelligent "timebase guesser" in the installer. At its boot, installer has no choice but to go with hardware clock, and at this point the odds are with assuming localtime. Now, it is the user who must be asked about the local time zone. If the question and display are correct, incorrect info from the user here is rare. Once that's set, ASK the user if ntp may be queried, then do so. If denied, ask the user the current date and time. Now there's a basis for creating a guess as to what the timebase of the hardware clock was at install session boot. Now we can tell the user, "Your hardware clock seems to be using UTC, and that seems fine", "Your hardware claock seems to be using localtime, but you might want to change that", or it's UTC and should be changed, or it's localtime and should work, or "damifino, good luck". Offer the localtime/UTC choice.

It is indeed the installer that must do this, and do it as soon after boot as practical. Otherwise, wrong times are on the installation, and wrong ideas are in the user's head. The second is of course the tougher problem to solve, and would have to be fixed before the machine can be properly configured.

There also needs to be an easily-findable way to set any of this after install. ntpd is best, nptdate1 is fine for many with near-correct hwclocks. But doing it manually should one often operate offline should work easily and smoothly, also.


1ntpdate is deprecated in favor of  'ntpd -q'. See ntpd(1).
Title: Re: 7.1 system time
Post by: StrayBit on August 10, 2013, 02:54:14 pm
I put the following at the end of /rc.d.rc.local:
Code: [Select]
ntpdate -b pool.ntp.org which sets the clock as I startup.
Title: Re: 7.1 system time
Post by: roarde on August 10, 2013, 03:13:38 pm
For those who have a connection at startup and a somewhat accurate hardware clock, StrayBit's info is the best choice (but note that ntpdate will be retired in favor of ntpd -q).

Those who have an unstable hardware clock will need to run ntpd as a daemon, so the time can be adjusted slowly.

Myself, I don't have netowork available at boot, and usually have to sign on via browser. Fortunately, I've a really good hardware clock. Haven't done it yet, but need to create an inet startup script and include 'ntpd -q'.

Any of these, even an immediate ntp call at startup, still don't address an improperly set hwclock timebase.
Title: Re: 7.1 system time
Post by: ddval on August 16, 2013, 04:56:53 am
id like to bring issue to the exclusion of a time configuration option in 7.1.  its my understanding that no option will be given during install to set time and no info will be made available to the end user about the possibility of their time not being set correctly.

time is rather important. i never even noticed mine was wrong until i noticed gmail had the wrong timestamps in my emails. its easy enough to fix, for example i did

ln -s /usr/share/zoneinfo/US/Michigan localtime  && hwclock -s

but why should the end user have to go searching and sorting to figure out how to set the time correctly when in my opinion it should be set during install. or atleast have a note popup immediately after install instructing how to do so

Holy-Smoke!,  and thank you.    
Title: Re: 7.1 system time
Post by: ddval on August 16, 2013, 05:18:31 am
grep "localtime\|UTC" /etc/hardwareclock
/sbin/vzoneset      at "localtime or UTC" choice, choose the one that did NOT appear when the above command was run.

I discovered this by asking my wristwatch, which relevantly replied, "Ask the clock."

Thank you roarde:  Your info worked for setting the local time on VL light, but when I post it seems the post time remains incorrect??? 
Title: Re: 7.1 system time
Post by: ddval on August 16, 2013, 05:32:53 am
im not sure if this post is related or not but its worth a mention

http://forum.vectorlinux.com/index.php?topic=17719.0

vasm-legacy would not set my time either, however on all other distros of my multi-boot laptop the time is correct.
note: its the sys time thats off, not the clock time (but clock time is as relevant as your wristwatch in this instance)
[/quote


Title: Re: 7.1 system time
Post by: roarde on August 16, 2013, 04:02:36 pm
Your info worked for setting the local time on VL light, but when I post it seems the post time remains incorrect???  

I assume you're talking about posting on this forum. Two issues here:
1) The server's time has not been synchronized in who knows when. Also, I have doubts that its timezone is set up correctly.
2) From the "front page", select "PROFILE". From the left box under "Modify Profile", choose "Look and Layout Preferences". If you delete the number from the time offset box and choose "auto detect", the box will be filled with what it should be set to. That will match the time offset between your system's local time and UTC. That won't work here because of item 1. Just look at "Current forum time" and choose a full-hour offset that'll make times display closest to reality.

Edit:
Just found out that the time-offset box will accept decimals. I set '4.5', and am posting to see if that works.

Back:
Yes, it does work :)  Tried '4:30' first, but that wasn't accepted. At 4.5 (EDT -0400 here), forum time seems about 3 min fast, which is acceptable to me.
Is the server in Newfoundland or someplace else with a persnickety time zone?
Title: Re: 7.1 system time
Post by: ddval on August 16, 2013, 08:59:58 pm
I put the following at the end of /rc.d.rc.local:
Code: [Select]
ntpdate -b pool.ntp.org which sets the clock as I startup.

When the computer starts a connection to an ntp server is made - are there times when this process would increase the time required for boot up?
Title: Re: 7.1 system time
Post by: ddval on August 16, 2013, 09:23:58 pm
Your info worked for setting the local time on VL light, but when I post it seems the post time remains incorrect???  

I assume you're talking about posting on this forum.

Edit:
Just found out that the time-offset box will accept decimals. I set '4.5', and am posting to see if that works.

Back:
Yes, it does work :)  Tried '4:30' first, but that wasn't accepted. At 4.5 (EDT -0400 here), forum time seems about 3 min fast, which is acceptable to me.
Is the server in Newfoundland or someplace else with a persnickety time zone?

Thank you roarde.  Worked as you directed.  Used 1.45 which made forum time stamp equal to local time.  
Title: Re: 7.1 system time
Post by: sledgehammer on August 16, 2013, 10:18:21 pm
Quote
From the "front page", select "PROFILE". From the left box under "Modify Profile", choose "Look and Layout Preferences"

Anyone know if Roard's suggestion works in VL7.0 and, if so, how to translate it into VL 7 talk?
Title: Re: 7.1 system time
Post by: ddval on August 17, 2013, 05:49:55 am
Quote
From the "front page", select "PROFILE". From the left box under "Modify Profile", choose "Look and Layout Preferences"

Anyone know if Roard's suggestion works in VL7.0 and, if so, how to translate it into VL 7 talk?

Yes - it does work for VL 7.0 Standard Gold.  I don't know about VL 7 talk.

7.0 VL Light is being loaded and when installed I'll use roarde's direction to set the forum time stamp to local time.  I'll post back.

UPDATE:  Did a test post at the lounge on VL 7.0 Light, and Roarde's suggestion is a good one.  
Title: Re: 7.1 system time
Post by: StrayBit on August 17, 2013, 06:38:24 am
I put the following at the end of /rc.d.rc.local:
Code: [Select]
ntpdate -b pool.ntp.org which sets the clock as I startup.

When the computer starts a connection to an ntp server is made - are there times when this process would increase the time required for boot up?
i have never noticed any increase in boot-up time.  Perhaps it works in the background until completed?
Title: Re: 7.1 system time
Post by: ddval on August 17, 2013, 09:32:34 am
I put the following at the end of /rc.d.rc.local:
Code: [Select]
ntpdate -b pool.ntp.org which sets the clock as I startup.

When the computer starts a connection to an ntp server is made - are there times when this process would increase the time required for boot up?
i have never noticed any increase in boot-up time.  Perhaps it works in the background until completed?

Just curious - thank you for the feed back.
Title: Re: 7.1 system time
Post by: nightflier on August 17, 2013, 10:04:28 am
Code: [Select]
ntpdate -b pool.ntp.orgPerhaps it works in the background until completed?

Put an ampersand at the end of the line and it will background:
Code: [Select]
ntpdate -b pool.ntp.org &
Title: Re: 7.1 system time
Post by: ddval on August 17, 2013, 01:06:13 pm
Code: [Select]
ntpdate -b pool.ntp.orgPerhaps it works in the background until completed?

Put an ampersand at the end of the line and it will background:
Code: [Select]
ntpdate -b pool.ntp.org &

Thank you nightflier - I needed that bit of data.
Title: Re: 7.1 system time
Post by: sledgehammer on August 17, 2013, 04:53:36 pm
Sorry about my sloppy language ("VL 7 talk").  I meant  just "VL 7."  I just don't know what "Front Page" is or where to find it.  Perhaps that's because I use xfce.

John
Title: Re: 7.1 system time
Post by: ddval on August 18, 2013, 12:24:43 pm
Sorry about my sloppy language ("VL 7 talk").  I meant  just "VL 7."  I just don't know what "Front Page" is or where to find it.  Perhaps that's because I use xfce.

John

Yes roarde suggestion does work.   I've used for both VL 7.0 light xlde  and VL 7.0 Std Gold xfce.

To follow up on roarde suggestion:  The path is:  Home;  Profile;  Look and Layout Preferences.

Title: Re: 7.1 system time
Post by: roarde on August 18, 2013, 05:57:49 pm
Quote
From the "front page", select "PROFILE". From the left box under "Modify Profile", choose "Look and Layout Preferences"

Anyone know if Roard's suggestion works in VL7.0 and, if so, how to translate it into VL 7 talk?
I'd wondered whether it was an understandable post. I'm trying to cut my wordiness, guess I cut too far.

This isn't a VL feature, rather a feature of the forum. It exists on most viewed pages, certainly on the entry page, http://forum.vectorlinux.com .
Just scan down from your avatar after signing in to find "Home", look directly right to find "PROFILE". Click through to the rest.
Title: Re: 7.1 system time
Post by: wigums on August 22, 2013, 05:55:22 pm
https://www.youtube.com/watch?v=tNKXi2va2Ws
Title: Re: 7.1 system time
Post by: sledgehammer on August 24, 2013, 07:19:47 pm
There was a young lady named Bright
She traveled far faster than light
She left one day in a relative way
And returned home the previous night.
Title: Re: 7.1 system time
Post by: ddval on August 26, 2013, 07:22:33 pm
There was a young lady named Bright
She traveled far faster than light
She left one day in a relative way
And returned home the previous night.


E=mC^2

C=Sqrt [E/m] 

She really clipped right along :-)
Title: Re: 7.1 system time
Post by: wigums on September 08, 2013, 03:08:39 pm
a package named 'adjtimex' has hit the untested repo. i thought it may be of some use to people with older hardware. at any rate it looked interesting. here is a quick snip from its readme

Code: [Select]
You probably already know that your computer has two clocks - the "real
time clock" (RTC) that runs all the time, and the system clock that runs
only while the computer is on.  The system clock has much better
precision (approximately 1 usec), but the RTC probably has better
long-term stability.  adjtimex can be used to approximately correct the
system clock for drift.

The handiest reference clock is the RTC.  
  adjtimex --compare
shows the time, the difference between the two clocks, the first
difference (how much the system clock has gained or lost relative to
the RTC since the last check), and two kernel time parameters: tick
and frequency offset.  After the first two comparisons, it also prints
suggested values of tick and frequency offset that will adjust the
system clock to approximately agree with the RTC.  Of course, the RTC
may have a systematic error of its own.  clock(8) uses the file
/etc/adjtime to record the drift rate and the time since the RTC was
last set.  adjtimex also consults this file and applies the correction
to the times from the RTC.
Title: Re: 7.1 system time
Post by: vincent2 on September 08, 2013, 09:43:14 pm
http://my.opera.com/marcomarongiu/blog/2012/10/12/know-your-tools-adjtimex

more about adjtimex