Page 1 of 1

Timezone and RTC timescale cheatcodes does not work

Posted: 21 Apr 2018, 17:58
by por01
OS: Porteus LXDE 4.0rc4 64bit

My RTC is kept in UTC.

Boot with 'timezone=Europe/London' cheatcode

Code: Select all

$ cat /proc/cmdline 
quiet BOOT_IMAGE=/boot/porteus/Porteus-LXDE-v4.0rc4-x86_64/boot/syslinux/vmlinuz from=boot/porteus/Porteus-LXDE-v4.0rc4-x86_64 noswap zram=33% base_only nomagic norootcopy nonetwork timezone=Europe/London

# hwclock -r
2018-04-21 14:02:07.228703+0000

$ date
Sat Apr 21 14:02:37 Local time zone must be set--see zic manual page 2018

$ cat /etc/hardwareclock
...
localtime

The correct Europe/London time (British Summer Time) was 15:02.

Boot with 'timezone=Europe/London utc' cheatcode

Code: Select all

$ cat /proc/cmdline
quiet BOOT_IMAGE=/boot/porteus/Porteus-LXDE-v4.0rc4-x86_64/boot/syslinux/vmlinuz from=boot/porteus/Porteus-LXDE-v4.0rc4-x86_64 noswap zram=33% base_only nomagic norootcopy nonetwork timezone=Europe/London utc

# hwclock -r
2018-04-21 14:12:22.011099+0000

$ date
Sat Apr 21 14:12:38 Local time zone must be set--see zic manual page 2018

$ cat /etc/hardwareclock
...
localtime

The correct Europe/London time was 15:12.

Boot from ISO with 'timezone=Europe/London utc' cheatcode

Code: Select all

$ cat /proc/cmdline
quiet BOOT_IMAGE=(loop)/boot/syslinux/vmlinuz from=boot/porteus/Porteus-LXDE-v4.0rc4-x86_64.iso noswap zram=33% base_only nomagic norootcopy nonetwork timezone=Europe/London utc

# hwclock -r
2018-04-21 14:47:43.760025+0000

$ date
Sat Apr 21 14:47:50 Local time zone must be set--see zic manual page 2018

$ cat /etc/hardwareclock
...
localtime

The correct Europe/London time was 15:47.

Boot with 'timezone=Etc/UTC utc' cheatcode

Code: Select all

$ cat /proc/cmdline
quiet BOOT_IMAGE=/boot/porteus/Porteus-LXDE-v4.0rc4-x86_64/boot/syslinux/vmlinuz from=boot/porteus/Porteus-LXDE-v4.0rc4-x86_64 noswap zram=33% base_only nomagic norootcopy nonetwork timezone=Etc/UTC utc

# hwclock -r
2018-04-21 14:33:26.088080+0000

$ date
Sat Apr 21 14:33:37 Local time zone must be set--see zic manual page 2018

$ cat /etc/hardwareclock
...
localtime

I would have some question connected to the above: What will happen if I manually sync the time with 'ntpdate pool.ntp.org' command, while the time zone is not set? Which timezone's time I will get from the server? If I run 'ntpdate pool.ntp.org' command, my RTC will be set (altered) too, or only the system time?

Timezone and RTC timescale cheatcodes does not work

Posted: 23 Apr 2018, 16:09
by brokenman
If I run 'ntpdate pool.ntp.org' command, my RTC will be set (altered) too, or only the system time?
Only your system time. That said, you can now test your first question without screwing your RTC. This clock question has been asked a few times onthe forum. Dig around a bit and you should find the walkthrough.

Timezone and RTC timescale cheatcodes does not work

Posted: 03 Jun 2018, 19:16
by por01
And the result was: running "ntpdate pool.ntp.org" command did not sync the hours (only the minutes and seconds) when not was set the timezone. And did not set the RTC, too. To set the RTC from system time, you have to run "hwclock --hctosys" command. So, no problems...

Meantime, I switched to Porteus LXDE 4.0 x86_64, and here work the timezone cheatcodes.

Timezone and RTC timescale cheatcodes does not work

Posted: 03 Jun 2018, 19:21
by Blaze
Hi por01.
You can apply this time hack :)

Code: Select all

su
toor
cp /etc/localtime{,.bak} && rm /etc/localtime && ln -s /usr/share/zoneinfo/Europe/London /etc/localtime && ntpdate pool.ntp.org && hwclock -lw

Timezone and RTC timescale cheatcodes does not work

Posted: 03 Jun 2018, 19:55
by por01
Thank you, but what is "toor" command, and for what? :roll:

Code: Select all

root@porteus:~# toor
bash: toor: command not found

Timezone and RTC timescale cheatcodes does not work

Posted: 03 Jun 2018, 21:58
by Ed_P
por01 wrote:
03 Jun 2018, 19:55
Thank you, but what is "toor" command, and for what? :roll:
:hmmm: What do you enter after you enter the su command?

Timezone and RTC timescale cheatcodes does not work

Posted: 03 Jun 2018, 23:40
by por01
:D Understand now. But this is a secret, you should not write here... I do not need it since always login=root :ROFL:

Timezone and RTC timescale cheatcodes does not work

Posted: 04 Jun 2018, 04:54
by donald
por01 wrote:
03 Jun 2018, 23:40
...But this is a secret, you should not write here...

Code: Select all

guest@porteus:~$ cat /etc/issue
Everyone sees this while booting Porteus.
In general, changing the root / user passwords is not a bad idea.

Timezone and RTC timescale cheatcodes does not work

Posted: 04 Jun 2018, 12:55
by por01
I kow that... :) But "/etc/issue" is new to me! Thanks.

Timezone and RTC timescale cheatcodes does not work

Posted: 05 Aug 2018, 15:20
by brokenman
Understand now. But this is a secret, you should not write here... I do not need it since always login=root
:buhehe: :ROFL:
That made my day!
por01 wrote:
21 Apr 2018, 17:58
timezone=Etc/UTC utc
Perhaps the problem is here. You don't seem to have a hardware clock using utc so remove that cheat. Also your cheat should be something more like timezone=Europe/London