System clock - [Solved]
Moderator: M. Eerie
- Ed_P
- Contributor
- Posts: 8908
- Joined: 06 Feb 2013, 22:12
- Distribution: Cinnamon 5.01 ISO
- Location: Western NY, USA
System clock - [Solved]
Whenever I boot Porteus 3.3 it sets my system's clock ahead 5 hrs. I suspect it has something to do with time zones but I can't figure out how to change that.
But even with the time zone wrong I don't think the OS should change the machine's clock without user involvement.
But even with the time zone wrong I don't think the OS should change the machine's clock without user involvement.
Last edited by Ed_P on 06 Dec 2015, 01:42, edited 3 times in total.
-
- Full of knowledge
- Posts: 428
- Joined: 02 Jan 2011, 18:41
- Distribution: Porteus v5.01.....PorteuX v1.4
- Location: In the bush now
Re: System clock
It seems to be an Arch bug, only happens with it anyway. I don't try to keep the time right anymore.
- Ed_P
- Contributor
- Posts: 8908
- Joined: 06 Feb 2013, 22:12
- Distribution: Cinnamon 5.01 ISO
- Location: Western NY, USA
Re: System clock
Is there an Arch command to set the time-zone or the clock?
-
- Full of knowledge
- Posts: 428
- Joined: 02 Jan 2011, 18:41
- Distribution: Porteus v5.01.....PorteuX v1.4
- Location: In the bush now
Re: System clock
No specific Arch commands....try hwclock or date....I haven't played with it myself.Ed_P wrote:Is there an Arch command to set the time-zone or the clock?
-
- Full of knowledge
- Posts: 428
- Joined: 02 Jan 2011, 18:41
- Distribution: Porteus v5.01.....PorteuX v1.4
- Location: In the bush now
Re: System clock
@Ed_P
Have you tried the setup commands in /usr/local/bin and sbin?
There are commands to setup a pile of things. Doesn't work for me, but I'm not running the same Porteus as you.
Edit
Try running setup-system..you should get a menu to do it all.
Another edit
If setup-system doesn't work, run tzselect and you get a cli setup...just pick your numbers for your locale.
Have you tried the setup commands in /usr/local/bin and sbin?
There are commands to setup a pile of things. Doesn't work for me, but I'm not running the same Porteus as you.
Edit
Try running setup-system..you should get a menu to do it all.
Another edit
If setup-system doesn't work, run tzselect and you get a cli setup...just pick your numbers for your locale.
- brokenman
- Site Admin
- Posts: 6105
- Joined: 27 Dec 2010, 03:50
- Distribution: Porteus v4 all desktops
- Location: Brazil
Re: System clock
Just read the config file for time. Set it there (/mnt/sdXy/config/time). I use an ntp server. It is damn annoying but it's the only way I can get the time to sit right. I believe you can also download a package called 'timeset' which has a lot of functions. I will look into why it is not dumping time to system clock on shutdown.
How do i become super user?
Wear your underpants on the outside and put on a cape.
Wear your underpants on the outside and put on a cape.
- ncmprhnsbl
- DEV Team
- Posts: 4253
- Joined: 20 Mar 2012, 03:42
- Distribution: v5.0-64bit
- Location: australia
- Contact:
Re: System clock
i agree, especially a portable OS..Ed_P wrote:But even with the time zone wrong I don't think the OS should change the machine's clock without user involvement.
what is your hardware running? localtime or UTC?
are far as i can see the config assumes UTC... ?
Forum Rules : https://forum.porteus.org/viewtopic.php?f=35&t=44
- francois
- Contributor
- Posts: 6497
- Joined: 28 Dec 2010, 14:25
- Distribution: xfce plank porteus nemesis
- Location: Le printemps, le printemps, le printemps... ... l'hiver s'essoufle.
Re: System clock
timezone in brokenman's config works perfectly for me.
Prendre son temps, profiter de celui qui passe.
- Ed_P
- Contributor
- Posts: 8908
- Joined: 06 Feb 2013, 22:12
- Distribution: Cinnamon 5.01 ISO
- Location: Western NY, USA
Re: System clock
Where do I look for it when I boot the ISO directly?brokenman wrote:Just read the config file for time. Set it there (/mnt/sdXy/config/time).
- Ed_P
- Contributor
- Posts: 8908
- Joined: 06 Feb 2013, 22:12
- Distribution: Cinnamon 5.01 ISO
- Location: Western NY, USA
Re: System clock
A good command. And it works right up to the end.roadie wrote:Edit
Try running setup-system..you should get a menu to do it all.
Code: Select all
Unfortunately /mnt/isoloop/config/time is not writable. Please
edit this configuration file to survive a reboot.
Another good command. Right up to the end.Another edit
If setup-system doesn't work, run tzselect and you get a cli setup...just pick your numbers for your locale.
Code: Select all
Therefore TZ='America/New_York' will be used.
Local time is now: Fri Dec 4 01:34:12 EST 2015.
Universal Time is now: Fri Dec 4 06:34:12 UTC 2015.
Is the above information OK?
1) Yes
2) No
#? 1
You can make this change permanent for yourself by appending the line
TZ='America/New_York'; export TZ
to the file '.profile' in your home directory; then log out and log in again.
Here is that TZ value again, this time on standard output so that you
can use the /usr/bin/tzselect command in shell scripts:
America/New_York
guest ~ $ tzselect America/New_York
/usr/bin/tzselect: America/New_York: unknown argument
guest ~ $ tzselect --help
Usage: tzselect [--version] [--help] [-c COORD] [-n LIMIT]
Select a time zone interactively.
But at least the time is correct at this point.
localtime. And I agree the config assumes UTC which is fine, but then it writes it to the hardware clock, when I reboot I suspect.ncmprhnsbl wrote:what is your hardware running? localtime or UTC?
are far as i can see the config assumes UTC... ?
Last edited by Ed_P on 04 Dec 2015, 07:04, edited 1 time in total.
- Ahau
- King of Docs
- Posts: 1331
- Joined: 28 Dec 2010, 15:18
- Distribution: LXDE & Xfce 32/64-bit
- Location: USA
Re: System clock
It appears to me that in Arch, the clock is set through (drumroll, please) systemd.
You can use "timedatectl" to set the clock, see https://wiki.archlinux.org/index.php/Time
Slackware based systems use "localtime" by default, meaning that the system clock matches the time of the hardware clock, with no offset for timezone. Systemd based systems use "UTC" clock by default, meaning the system assumes the hardware clock is set to UTC+0 (Greenwich Mean Time) and then it offsets the system time based on the timezone.
To clarify, is your system five hours ahead when you are in Nemesis, then when you reboot into another OS, the clock shows the correct time? Or, is the time correct in Nemesis, and when you boot back into another OS, at that point the time gets shifted by five hours? I've seen both issues; the prior is the result of not having the correct timezone set, and the latter would suggest a bug (in my experience, it occurs when you have the system clock set to localtime but you apply a timezone to it, then set the time to be what you think is correct. When the clock syncs from the system back to the hardware clock at shutdown, it offsets the hardware clock, which makes things go wonky in the next OS you boot into.
At any rate, it's not a bug I'm experiencing with Nemesis because my hardware clock is set to localtime (works out of the box in Porteus, and in Nemesis it shows the correct time by incorrectly assuming my clock is set to UTC and the default timezone is UTC). Given my experience with timezones in Porteus, though, I may be able to help work this one out.
You can use "timedatectl" to set the clock, see https://wiki.archlinux.org/index.php/Time
Slackware based systems use "localtime" by default, meaning that the system clock matches the time of the hardware clock, with no offset for timezone. Systemd based systems use "UTC" clock by default, meaning the system assumes the hardware clock is set to UTC+0 (Greenwich Mean Time) and then it offsets the system time based on the timezone.
To clarify, is your system five hours ahead when you are in Nemesis, then when you reboot into another OS, the clock shows the correct time? Or, is the time correct in Nemesis, and when you boot back into another OS, at that point the time gets shifted by five hours? I've seen both issues; the prior is the result of not having the correct timezone set, and the latter would suggest a bug (in my experience, it occurs when you have the system clock set to localtime but you apply a timezone to it, then set the time to be what you think is correct. When the clock syncs from the system back to the hardware clock at shutdown, it offsets the hardware clock, which makes things go wonky in the next OS you boot into.
At any rate, it's not a bug I'm experiencing with Nemesis because my hardware clock is set to localtime (works out of the box in Porteus, and in Nemesis it shows the correct time by incorrectly assuming my clock is set to UTC and the default timezone is UTC). Given my experience with timezones in Porteus, though, I may be able to help work this one out.
Please take a look at our online documentation, here. Suggestions are welcome!
- Ed_P
- Contributor
- Posts: 8908
- Joined: 06 Feb 2013, 22:12
- Distribution: Cinnamon 5.01 ISO
- Location: Western NY, USA
Re: System clock
Yes.Ahau wrote:To clarify, is your system five hours ahead when you are in Nemesis,
No, they are then all five hours ahead.then when you reboot into another OS, the clock shows the correct time?
- Ed_P
- Contributor
- Posts: 8908
- Joined: 06 Feb 2013, 22:12
- Distribution: Cinnamon 5.01 ISO
- Location: Western NY, USA
Re: System clock
The .profile file option works.Ed_P wrote: No .profile file in /home/guest. Several .bash files and others but no .profile. So I created one and added TZ='America/New_York' to it. Will see what happens next time I reboot.

Thanks guys.

- Ed_P
- Contributor
- Posts: 8908
- Joined: 06 Feb 2013, 22:12
- Distribution: Cinnamon 5.01 ISO
- Location: Western NY, USA
Re: System clock - not solved

The clock displays correctly in Porteus 3.3 now but booting other OSs clocks are now 5 hours fast still.

- Ahau
- King of Docs
- Posts: 1331
- Joined: 28 Dec 2010, 15:18
- Distribution: LXDE & Xfce 32/64-bit
- Location: USA
Re: System clock - not solved
Hi Ed,
What other OS's are you running? If it's Porteus, are you running with a timezone set?
Does the clock continue to advance 5 hours on every subsequent boot of Nemesis, i.e. it's Noon in New York, you boot into Nemesis and your clock says it's 5pm; then you reboot into Porteus and it shows 5pm, then you boot back into Nemesis and it's 10pm? or is it consistently 5 hours ahead?
For both Nemesis and standard Porteus (without altering your settings or your clock time from where they are now), can you please give the output of:
What other OS's are you running? If it's Porteus, are you running with a timezone set?
Does the clock continue to advance 5 hours on every subsequent boot of Nemesis, i.e. it's Noon in New York, you boot into Nemesis and your clock says it's 5pm; then you reboot into Porteus and it shows 5pm, then you boot back into Nemesis and it's 10pm? or is it consistently 5 hours ahead?
For both Nemesis and standard Porteus (without altering your settings or your clock time from where they are now), can you please give the output of:
Code: Select all
date
date -u
Please take a look at our online documentation, here. Suggestions are welcome!