Possible Time Stamp Shifting Between System Time And App

Please reproduce your error on a second machine before posting, and check the error by running without saved changes or extra modules (See FAQ No. 13, "How to report a bug"). For unstable Porteus versions (alpha, beta, rc) please use the relevant thread in our "Development" section.
jimwg
Shogun
Shogun
Posts: 322
Joined: 09 Oct 2013, 18:15
Distribution: porteus
Location: NYC

Re: Possible Time Stamp Shifting Between System Time And App

Post#16 by jimwg » 05 Nov 2013, 10:25

Ahau wrote: Also, when I run the 'timeconfig' utility and go to set the time, I have back, cancel, and apply buttons; the apply button is grayed out until you make modifications. If you don't have this button, please take a screenshot and post it or send it to me and I'll get it fixed.
Don't know how to do this. Do you have any hints? I'll act ASAP. Porteus is too nice and powerful for news of this mail time-stamp glitch to get out and discourage people from ever trying this OS!

Jim in NYC

jimwg
Shogun
Shogun
Posts: 322
Joined: 09 Oct 2013, 18:15
Distribution: porteus
Location: NYC

Re: Possible Time Stamp Shifting Between System Time And App

Post#17 by jimwg » 06 Nov 2013, 15:15

wread wrote:@jimwg
I see you could get both local and UTC times to show correctly, but lost the setting at next reboot :x
It is my fault, as I forgot to write, you should copy the file /etc/localtime to rootcopy/etc/localtime, so the next time you reboot you will have it right. :)

Enjoy!
System search can't find "localtime" anywhere. :(

Jim in NYC
Porteus 2.1 32bit XFCE

User avatar
Ahau
King of Docs
King of Docs
Posts: 1331
Joined: 28 Dec 2010, 15:18
Distribution: LXDE & Xfce 32/64-bit
Location: USA

Re: Possible Time Stamp Shifting Between System Time And App

Post#18 by Ahau » 06 Nov 2013, 21:05

I think I've figured it out... after setting the hardware clock to 'localtime' and specifying your proper timezone, you need to update the system clock from the hardware clock with the new timezone offset. You could do this by running 'timeconfig' from a terminal, select localtime and your timezone, then run

Code: Select all

hwclock --localtime --hctosys
I've updated the GUI tool to accommodate this, so rather than going the CLI route above, you can download and activate this module, then run the timeconfig GUI tool from porteus-settings-center

http://porteus-xfce.googlecode.com/file ... h-pre1.xzm

Please test this for me and let me know what happens. I'm assuming you'll want to select 'localtime' and 'US/Eastern'. Once you apply the change it should be working for you and if you aren't saving changes it will prompt you to build a module to make it persistent.

also note for anyone setting their clock (date/time, not timezone) with this updated application - there are some changes to the button layout, "apply" and "update hardware clock" - the intention of the apply button is to set the time for the current session only without modifying the hardware clock; this won't really be effective until Porteus 3.0 (that is to say, it will likely be persistent even though the application says it won't be).

Thanks!
Please take a look at our online documentation, here. Suggestions are welcome!

jimwg
Shogun
Shogun
Posts: 322
Joined: 09 Oct 2013, 18:15
Distribution: porteus
Location: NYC

Re: Possible Time Stamp Shifting Between System Time And App

Post#19 by jimwg » 08 Nov 2013, 22:25

Ahau wrote:I think I've figured it out... after setting the hardware clock to 'localtime' and specifying your proper timezone, you need to update the system clock from the hardware clock with the new timezone offset. You could do this by running 'timeconfig' from a terminal, select localtime and your timezone, then run

Code: Select all

hwclock --localtime --hctosys
I've updated the GUI tool to accommodate this, so rather than going the CLI route above, you can download and activate this module, then run the timeconfig GUI tool from porteus-settings-center

http://porteus-xfce.googlecode.com/file ... h-pre1.xzm

Please test this for me and let me know what happens. I'm assuming you'll want to select 'localtime' and 'US/Eastern'. Once you apply the change it should be working for you and if you aren't saving changes it will prompt you to build a module to make it persistent.

also note for anyone setting their clock (date/time, not timezone) with this updated application - there are some changes to the button layout, "apply" and "update hardware clock" - the intention of the apply button is to set the time for the current session only without modifying the hardware clock; this won't really be effective until Porteus 3.0 (that is to say, it will likely be persistent even though the application says it won't be).

Thanks!
I get a Porteus message:

/mnt/sdb1/porteus/modules/gtk-porteus-timeconfig-v3.0-noarch pre1.xzm is not a valid porteus module!! We must abort now!

:(

Jim in NYC

User avatar
fanthom
Site Admin
Site Admin
Posts: 4588
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland, currently - Cork, IE
Contact:

Re: Possible Time Stamp Shifting Between System Time And App

Post#20 by fanthom » 08 Nov 2013, 22:28

PPM is bit strict about the rules the module was created :)
just double click on the xzm to activate it (PPM wont complain then).
Please add [Solved] to your thread title if the solution was found.

jimwg
Shogun
Shogun
Posts: 322
Joined: 09 Oct 2013, 18:15
Distribution: porteus
Location: NYC

Re: Possible Time Stamp Shifting Between System Time And App

Post#21 by jimwg » 09 Nov 2013, 01:16

fanthom wrote:PPM is bit strict about the rules the module was created :)
just double click on the xzm to activate it (PPM wont complain then).
Thanks for rapid reply!

Had to right-click on file residing in download folder instead of using Puppy Package to activate it and suddenly CPU meter went off the scale and the fan -- which very rarely spins up on this old Thinkpad -- went into turbo overdrive! Also for some (maybe unrelated?) reason Stellarium doesn't work. Unknown whether time issue worked on Seamonkey mail timestamps due overheat concern.

Jim in NYC

User avatar
Ahau
King of Docs
King of Docs
Posts: 1331
Joined: 28 Dec 2010, 15:18
Distribution: LXDE & Xfce 32/64-bit
Location: USA

Re: Possible Time Stamp Shifting Between System Time And App

Post#22 by Ahau » 09 Nov 2013, 01:45

Did your CPU usage go up right when you activated the module, or when you tried to run the script? I have never seen 'activate' do this, but I have seen ktsuss use more cycles than I would like. Ktsuss is the little utility that prompts you for your root password. If it happened when you tried starting the application, please try running it from a terminal and use su to log in as root first, so ktsuss is not invoked. Also try running 'top' in a terminal or xfce4-task manager to see if you can see what process is using so much CPU. That will help us track it down. Hopefully it was a fluke thing. Thanks for testing!
Please take a look at our online documentation, here. Suggestions are welcome!

User avatar
wread
Module Guard
Module Guard
Posts: 1080
Joined: 09 Jan 2011, 18:48
Distribution: Porteus v3.2.5-kde5-64 bits
Location: Santo Domingo
Contact:

Re: Possible Time Stamp Shifting Between System Time And App

Post#23 by wread » 09 Nov 2013, 19:49

@jimwg
This is my localtime file. If you cannot make your own I can post you mine or make one for you showing "New York" instead "Santo Domingo"..
Image

Regards!

P.S. Here my localtime file put it in modules and reboot http://www.mediafire.com/download/q9gil ... timeSD.xzm
Porteus is proud of the FASTEST KDE ever made.....(take akonadi, nepomuk and soprano out and you will have a decent OS).
The Porteus Community never sleeps!

jimwg
Shogun
Shogun
Posts: 322
Joined: 09 Oct 2013, 18:15
Distribution: porteus
Location: NYC

Re: Possible Time Stamp Shifting Between System Time And App

Post#24 by jimwg » 11 Nov 2013, 00:26

wread wrote:@jimwg
This is my localtime file. If you cannot make your own I can post you mine or make one for you showing "New York" instead "Santo Domingo"..
Image

Regards!

P.S. Here my localtime file put it in modules and reboot http://www.mediafire.com/download/q9gil ... timeSD.xzm

Downloaded and it said it activated and rebooted but Seamonkey mail date stamp still four hours off though menu check is normal. What exactly should I write in localtime file myself in case activation is bogus (and might incidentally explain why Stellarium stopped appearing as well now). I have to hold off using Porteus for now unless I somehow ignore using Seamonkey for mail which is unlikely. I fear bad time stamps might be passed on or effecting mail on other computers accessing same mail system as well.

Jim in NYC


Jim in NYC

User avatar
wread
Module Guard
Module Guard
Posts: 1080
Joined: 09 Jan 2011, 18:48
Distribution: Porteus v3.2.5-kde5-64 bits
Location: Santo Domingo
Contact:

Re: Possible Time Stamp Shifting Between System Time And App

Post#25 by wread » 11 Nov 2013, 13:33

@jimwg
The fault is in Seamonkey's configuration, I guess!
Localtime file is binary, difficult to edit, only gurus can do it.
This file is generated as soon as you configure your timezone-localtime.
I copied it to rootcopy in order to have it available on every reboot... This is a Porteus feature 8)

For Stellarium you will need the same trick; default settings are for Paris, France. You must change it to NY and then copy folder /root/.stellarium to rootcopy/root/, so when you reboot you will have your Stellarium as seen from NY.

Good luck!
Porteus is proud of the FASTEST KDE ever made.....(take akonadi, nepomuk and soprano out and you will have a decent OS).
The Porteus Community never sleeps!

User avatar
Ahau
King of Docs
King of Docs
Posts: 1331
Joined: 28 Dec 2010, 15:18
Distribution: LXDE & Xfce 32/64-bit
Location: USA

Re: Possible Time Stamp Shifting Between System Time And App

Post#26 by Ahau » 11 Nov 2013, 15:53

I respectfully disagree with wread - I still think you've not quite gotten your time configuration correct, and it's likely due to my lack of describing what to do and how to accomplish it.

Let's start off with some pictures to help clarify the situation:

Here's a screenshot of seamonkey mail misbehaving. I sent myself a test email, at 6:57am. The bad, bad monkey seems to think this email came from the future, at 2:57pm. I believe this is the same issue you're having, correct? (please ignore the email above it -- one of my mailing lists is apparently emailing me from next year. I'll get Doc Brown on it right away)
Image

Now, after activating the module (or booting with it in /porteus/modules so it activates on startup), you need to run the GUI timeconfig utility, which you will be able to access by going to system -> Porteus Settings Centre -> click on the "System" button -> Time config -> set timezone
This is what it looks like with my settings (localtime and US/Pacific -- Jim, you will choose localtime and US/Eastern. When done, click "apply". You can choose to create a module to save these settings if you aren't saving changes (if you are saving changes, the settings will carry over with your saved changes). You can see that I made it so that the timezone shows in the preview of how the clock will show - 7am PST
Image

Here's a pic of the output of "date" in a terminal window - both before and after applying the timezone change. You can see that before changing the timezone, the system was assuming the local time was "Factory", which is the same as being UTC/GMT. Thus, when my earlier email was sent, the system saw it was from 6:57am PST and it converted it to local time, which it thinks is GMT (8 hours later than PST) so it showed up as arriving at 2PM. After applying the changes, 'date' shows that it's 6:57 PST and 'hwclock --utc' uhhh -- shifts things around and applies an offset in the opposite direction (why? I don't yet know lol)
Image

Now that everything is straightened out with my clock (more or less), Seamonkey sees that my mail went out at 6:57am PST and arrived in Seamonkey at 6:57 PST, so we're all squared away.
Image

And for grins, here's Stellarium, correctly showing the sun just peeking over the Eastern horizon at 7:25 (with my location set to Seattle) to begin a horribly short and soon to be cloudy, if not rainy, day in the Pacific Northwest.
Image

Jim, I understand your concerns and really thank you for pressing this one because it was an issue I hadn't seen and I'm glad to have a solution (apparently) on the horizon at least. Please stay with us a little longer, I really want to make sure we get this fixed for you and everyone else!

If you go through the process outlined above and it's still not 100% right, please give me the output of:

Code: Select all

date
hwclock
cat /etc/hardwareclock
ls -l /etc|grep local
and that will help me troubleshoot further.
Please take a look at our online documentation, here. Suggestions are welcome!

User avatar
Ahau
King of Docs
King of Docs
Posts: 1331
Joined: 28 Dec 2010, 15:18
Distribution: LXDE & Xfce 32/64-bit
Location: USA

Re: Possible Time Stamp Shifting Between System Time And App

Post#27 by Ahau » 11 Nov 2013, 15:57

P.S. - the "localtime" file wread is referring to is a binary file that is actually a part of the GNU libC zoneinfo package. There's a different binary file for each timezone. Go to /usr/share/zoneinfo to see all of them. When you set your timezone, one of these binary files (in your case US/Eastern) gets copied into /etc and renamed 'localtime'. The system pulls data from the binary in order to apply the offset and know which timezone you're using. Since you don't have an /etc/localtime file present, you don't have a timezone set and it's defaulting to 'Factory'. The application I wrote and am suggesting above is a graphical tool that does this work for you.

The file /etc/hardwareclock is a text file and it just tells your system whether the hardware clock is set to UTC or localtime (most computers, especially those that have windows installed on them use the localtime time standard).

HTH
Please take a look at our online documentation, here. Suggestions are welcome!

User avatar
wread
Module Guard
Module Guard
Posts: 1080
Joined: 09 Jan 2011, 18:48
Distribution: Porteus v3.2.5-kde5-64 bits
Location: Santo Domingo
Contact:

Re: Possible Time Stamp Shifting Between System Time And App

Post#28 by wread » 12 Nov 2013, 12:59

@Ahau
my dear Doctor, I made the same test with the timestamp of my mail agents and they are all ok...

Image

As I dont use mail clients (they make my usb stick full in short time...), I guess you should revise the logic of Seamonkey or whatever. My time settings in kde4 are fully correct. That issue does not affect me in absolut.

Regards 8)
Porteus is proud of the FASTEST KDE ever made.....(take akonadi, nepomuk and soprano out and you will have a decent OS).
The Porteus Community never sleeps!

jimwg
Shogun
Shogun
Posts: 322
Joined: 09 Oct 2013, 18:15
Distribution: porteus
Location: NYC

Re: Possible Time Stamp Shifting Between System Time And App

Post#29 by jimwg » 12 Nov 2013, 15:40

I'd be happy to beta test your fixes prior Porteus 3.0 because newbies and surfers checking in should've have to turn into mechanics going under the hood so to check out a new OS ! :)

Jim in NYC

User avatar
Ahau
King of Docs
King of Docs
Posts: 1331
Joined: 28 Dec 2010, 15:18
Distribution: LXDE & Xfce 32/64-bit
Location: USA

Re: Possible Time Stamp Shifting Between System Time And App

Post#30 by Ahau » 12 Nov 2013, 15:52

@wread -- webmail is not affected by this, because they're drawing time from their own server. Seamonkey and Stellarium are the only programs for which I've confirmed the issue but I suspect other mail clients may behave similarly. If you've set your timezone and your system displays the correct time, you won't be affected by this issue. It's only cases where /etc/hardwareclock is set to localtime and /etc/localtime is pointing to Factory.

@jimwg -- thanks for your willingness to help :) The time config application I posted earlier is the proposed fix for 3.0, though I may need to fix some of the text a bit ;)
Please take a look at our online documentation, here. Suggestions are welcome!

Post Reply