Timezone and RTC timescale cheatcodes does not work

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.
por01
White ninja
White ninja
Posts: 18
Joined: 19 Apr 2018, 14:17
Distribution: Porteus LXDE 4.0 x86_64

Timezone and RTC timescale cheatcodes does not work

Post#1 by por01 » 21 Apr 2018, 17:58

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?

User avatar
brokenman
Site Admin
Site Admin
Posts: 6105
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v4 all desktops
Location: Brazil

Timezone and RTC timescale cheatcodes does not work

Post#2 by brokenman » 23 Apr 2018, 16:09

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.
How do i become super user?
Wear your underpants on the outside and put on a cape.

por01
White ninja
White ninja
Posts: 18
Joined: 19 Apr 2018, 14:17
Distribution: Porteus LXDE 4.0 x86_64

Timezone and RTC timescale cheatcodes does not work

Post#3 by por01 » 03 Jun 2018, 19:16

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.

User avatar
Blaze
DEV Team
DEV Team
Posts: 3869
Joined: 28 Dec 2010, 11:31
Distribution: ⟰ Porteus current ☯ all DEs ☯
Location: ☭ Russian Federation, Lipetsk region, Dankov
Contact:

Timezone and RTC timescale cheatcodes does not work

Post#4 by Blaze » 03 Jun 2018, 19:21

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
Linux 6.6.11-porteus #1 SMP PREEMPT_DYNAMIC Sun Jan 14 12:07:37 MSK 2024 x86_64 Intel(R) Xeon(R) CPU E3-1270 v6 @ 3.80GHz GenuineIntel GNU/Linux
MS-7A12 » [AMD/ATI] Navi 23 [Radeon RX 6600] [1002:73ff] (rev c7) » Vengeance LPX 16GB DDR4 K2 3200MHz C16

por01
White ninja
White ninja
Posts: 18
Joined: 19 Apr 2018, 14:17
Distribution: Porteus LXDE 4.0 x86_64

Timezone and RTC timescale cheatcodes does not work

Post#5 by por01 » 03 Jun 2018, 19:55

Thank you, but what is "toor" command, and for what? :roll:

Code: Select all

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

User avatar
Ed_P
Contributor
Contributor
Posts: 8341
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Timezone and RTC timescale cheatcodes does not work

Post#6 by Ed_P » 03 Jun 2018, 21:58

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?
Ed

por01
White ninja
White ninja
Posts: 18
Joined: 19 Apr 2018, 14:17
Distribution: Porteus LXDE 4.0 x86_64

Timezone and RTC timescale cheatcodes does not work

Post#7 by por01 » 03 Jun 2018, 23:40

:D Understand now. But this is a secret, you should not write here... I do not need it since always login=root :ROFL:

donald
Full of knowledge
Full of knowledge
Posts: 2064
Joined: 17 Jun 2013, 13:17
Distribution: Porteus 3.2.2 XFCE 32bit
Location: Germany

Timezone and RTC timescale cheatcodes does not work

Post#8 by donald » 04 Jun 2018, 04:54

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.

por01
White ninja
White ninja
Posts: 18
Joined: 19 Apr 2018, 14:17
Distribution: Porteus LXDE 4.0 x86_64

Timezone and RTC timescale cheatcodes does not work

Post#9 by por01 » 04 Jun 2018, 12:55

I kow that... :) But "/etc/issue" is new to me! Thanks.

User avatar
brokenman
Site Admin
Site Admin
Posts: 6105
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v4 all desktops
Location: Brazil

Timezone and RTC timescale cheatcodes does not work

Post#10 by brokenman » 05 Aug 2018, 15:20

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
How do i become super user?
Wear your underpants on the outside and put on a cape.

Post Reply