Setting Time Zone

Please post any bugs you have found
Post Reply
Message
Author
kpfuser
Posts: 207
Joined: Sun 19 Mar 2006, 15:02
Location: Mt Pelion, Greece

Setting Time Zone

#1 Post by kpfuser »

After setting date and time via Menu/Settings/Date and Time Set, a popup displays date and time as set plus time zone. In my case, the time zone shown was wrong. If I use Menu/Settings/Set Timezone to correct it, I succeed only if I specify my time zone as Europe/Athens. If I specify it as GMT+2 and then check it running the date command, the system reports a GMT-2 time zone. If I subsequently use Menu/Settings/P-Sync Time Server Synchroniser, I get into a real mess as the time set changes in the process.

I ran into this problem running an ISpup-Q120 live CD and confirmed it by running an older NOP 4.1.2 live CD.

nooby
Posts: 10369
Joined: Sun 29 Jun 2008, 19:05
Location: SwedenEurope

#2 Post by nooby »

I should not answer due to me can not explain it on the level you expect.

But this is a known problem and it has to do with choices when one make the iso.

Developer make choices. it is a kind of matter of personal taste involved.

What is most likely or what is most preferred by that Dev.

To some the choice was made wrong to others it was the right choice.

But people have tried to make work arounds for it.
We had a thread rather recently where people gave suggestions
and some say one should set the RTC the Cmost real time clock in BIOS
as UTC and others say one should set it to local time and then change it two times each year when the day time saving change.

So it is up to you to find those posts :) Just teasing.
if your lucky somebody give you a good link to the solution them prefer!
I use Google Search on Puppy Forum
not an ideal solution though

kpfuser
Posts: 207
Joined: Sun 19 Mar 2006, 15:02
Location: Mt Pelion, Greece

#3 Post by kpfuser »

nooby,

Thank you for the info. It is very much like Puppy in particular and Linux in general to have to settle for work-arounds rather than solutions to problems. So let it be then.

However, I would like to suggest a rather simple work-around. In the popup that ensues after the sequence Menu/Settings/Set timezone, remove all options prompting you to specify your time zone in the format GMT+/-X, which lead to grief, and leave only the options that prompt you to specify your time zone in the format Continent/Major City, which leads to success.. What sense is there in allowing a second choice that leads to trouble if one goes for it? Don't the Puppy gurus know that we, the simple-minded users, given a 50-50 choice go wrong 75% of the time?

User avatar
L18L
Posts: 3479
Joined: Sat 19 Jun 2010, 18:56
Location: www.eussenheim.de/

Setting Time Zone

#4 Post by L18L »

kpfuser wrote:...
However, I would like to suggest a rather simple work-around. In the popup that ensues after the sequence Menu/Settings/Set timezone, remove all options prompting you to specify your time zone in the format GMT+/-X, which lead to grief, and leave only the options that prompt you to specify your time zone in the format Continent/Major City, which leads to success..
+1 8)
...and a slightly smaller iso

User avatar
L18L
Posts: 3479
Joined: Sat 19 Jun 2010, 18:56
Location: www.eussenheim.de/

Setting Time Zone

#5 Post by L18L »

Menu>Desktop>Set Time Zone
/usr/sbin/timezone-set wrote:Please choose your timezone.
If a city/region/country in your timezone is not listed, choose a GMT<number>
So for me the best solution now would be change setting of initial value
from
GMT+8 (Perth, Singapore, Hongkong)
to
Australia/Perth
:idea:

User avatar
tasmod
Posts: 1460
Joined: Thu 04 Dec 2008, 13:53
Location: North Lincolnshire. UK
Contact:

#6 Post by tasmod »

Psync does state to set the timezone in the Locale format else it won't work.

i.e. Europe/London

If you choose GMT then do not use Psync.

Locales contain the offset plus settings for DST.

Puppy reports in reverse notation. i.e GMT+2 reports as GMT-2. Just to be clear this is not unique to Puppy but a feature of the tzinfo file for GMT offsets.
Rob
-
The moment after you press "Post" is the moment you actually see the typso 8)

User avatar
tasmod
Posts: 1460
Joined: Thu 04 Dec 2008, 13:53
Location: North Lincolnshire. UK
Contact:

#7 Post by tasmod »

Just to add some more to this.

I spent some time checking Psyncs operation against the zoneinfo.

If, for instance you set your time zone using GMT with offset. i.e. GMT+4
then the following confusion occurs.

If you set your hardware time in a terminal using " hwclock --utc " then obviously it will set to UTC, BUT and it's a confusing one, the time reported in the terminal by hwclock is in localtime.

Yes that's right, localtime !! Even though you have just used the command, it illogically reports back in localtime from the zoneinfo to the terminal.

However the tray clock will show UTC plus the offset! Which is correct.

This can be most confusing for some.

Using the date command does the same. It reads the zoneinfo and reports what it finds there. Zoneinfo has reverse notation, this is the Unix standard, not Puppy's fault.
Last edited by tasmod on Tue 11 Oct 2011, 09:47, edited 1 time in total.
Rob
-
The moment after you press "Post" is the moment you actually see the typso 8)

User avatar
tasmod
Posts: 1460
Joined: Thu 04 Dec 2008, 13:53
Location: North Lincolnshire. UK
Contact:

#8 Post by tasmod »

I checked Psync against using either UTC or localtime on the hardware clock and setting a GMT offset.

Example :Using Athens as GMT+2

It does work correctly. However the actual report window lines are :-

Timezone set as /Etc/GMT-2 (This is direct from zoneinfo and is reverse notation, it would be corrected if Europe/Athens was used)

Offset to UTC +0200 (This is the correct notation because I parsed the file in code and reversed it !)

The tray clock showed the correct +2 hours over GMT.

Perhaps I should change the header to "True offset to UTC" to explain it better.

Synching against any of the servers produced a correct result and didn't alter the clock significantly. Other than correcting the few milliseconds accuracy.
Rob
-
The moment after you press "Post" is the moment you actually see the typso 8)

User avatar
L18L
Posts: 3479
Joined: Sat 19 Jun 2010, 18:56
Location: www.eussenheim.de/

#9 Post by L18L »

Tasmod,
thanks for explaining this again.

Yes, there is no bug confusing anyhow not only newcomers but old geezers like me too. I have been knowing Greenwich and time zones since more than 50 years and was used to always choose my GMT time zone. (and corrected my time manually when DaylightSavingTime had appeared here too. )

Everything is correct in puppy but people tend to
- not RTFM
- not read: If a city/region/country in your timezone is not listed, choose a GMT<number>

We can live with the reversed notation but I have learned in this forum that using region/city instead of GMT+1 is better, not confusing and using summer time automatically.

Very interesting is http://en.wikipedia.org/wiki/List_of_tz ... time_zones :
Perth has no summer time, so no problems or need to choose region/city 8)
and
Africa/Cairo: summer time has been canceled since 2011 :D

Cheers

User avatar
tasmod
Posts: 1460
Joined: Thu 04 Dec 2008, 13:53
Location: North Lincolnshire. UK
Contact:

#10 Post by tasmod »

And where 01micko lives there's a 30 minute DST version. 8)
Rob
-
The moment after you press "Post" is the moment you actually see the typso 8)

User avatar
Karl Godt
Posts: 4199
Joined: Sun 20 Jun 2010, 13:52
Location: Kiel,Germany

#11 Post by Karl Godt »

As far as I had read in the net , GMT+1 always means +1 hour , not east of Greenwich and the same for GMT-1

The script /usr/sbin/timezone-set changes GMT+[0-9]* to GMT-[0-9]* and vice versa .

I had never had a real problem with or demand for a correct Timezone setting , but I would like to know the basis for the changing from '+' to '-' .

Commenting the relevant part in /sbin/timezone gives me

# date +%c
Thu 20 Oct 2011 11:31:24 AM GMT+1 Ante Meridiem before noon

though my clock says 08:31:xy PM Post Meridiem after noon ; +9 hours difference .

[ readlink -e /etc/localtime
/usr/share/zoneinfo/Etc/GMT+1 ; will try pkg for these files from other distros ]

Having had the timezone to GMT-1 the date command showed the "correct BIOS local time" .

The time zone is a little bit problematic @boot , because the correct local BIOS time is ignored by the kernel first and somehow gets adjusted after the drivers get loaded . Puppy kernels have not much rtc drivers enabled by default . The most annoying thing is that the mount time of a partition gets not notified correctly to the superblock of the partition and running a fsck on the partition 4 hours later for example would say something like "Superblock last mount time is in the future , adjust ? (y)" or similar .

[ Puppy 430 DOTconfig-K2.6.30.5-01SEPT09-TICKLESS-SMP ]

[edit]
# tzselect is a funny command :

Please identify a location so that time zone rules can be set correctly.
Please select a continent or ocean.
1) Africa
2) Americas
3) Antarctica
4) Arctic Ocean
5) Asia
6) Atlantic Ocean
7) Australia
8) Europe
9) Indian Ocean
10) Pacific Ocean
11) none - I want to specify the time zone using the Posix TZ format.
#? 8
Please select a country.
1) Aaland Islands 18) Greece 35) Norway
2) Albania 19) Guernsey 36) Poland
3) Andorra 20) Hungary 37) Portugal
4) Austria 21) Ireland 38) Romania
5) Belarus 22) Isle of Man 39) Russia
6) Belgium 23) Italy 40) San Marino
7) Bosnia & Herzegovina 24) Jersey 41) Serbia
8) Britain (UK) 25) Latvia 42) Slovakia
9) Bulgaria 26) Liechtenstein 43) Slovenia
10) Croatia 27) Lithuania 44) Spain
11) Czech Republic 28) Luxembourg 45) Sweden
12) Denmark 29) Macedonia 46) Switzerland
13) Estonia 30) Malta 47) Turkey
14) Finland 31) Moldova 48) Ukraine
15) France 32) Monaco 49) Vatican City
16) Germany 33) Montenegro
17) Gibraltar 34) Netherlands
#? 16

The following information has been given:

Germany

Therefore TZ='Europe/Berlin' will be used.
Local time is now: Thu Oct 20 15:32:56 CEST 2011.
Universal Time is now: Thu Oct 20 13:32:56 UTC 2011.
Is the above information OK?
1) Yes
2) No
#? 2

#? 11
Please enter the desired value of the TZ environment variable.
For example, GST-10 is a zone named GST that is 10 hours ahead (east) of UTC.

GMT+1
awk: cmd. line:4: warning: escape sequence `\.' treated as plain `.'

The following information has been given:

TZ='GMT+1'

Therefore TZ='GMT+1' will be used.
Local time is now: Thu Oct 20 12:36:48 GMT 2011.
Universal Time is now: Thu Oct 20 13:36:48 UTC 2011.
Is the above information OK?

NONONO

In the end I triggered

# hwclock --hctosys --localtime
# date
Thu Oct 20 21:44:08 GMT+1 2011

I guess there is something wrong with the tzdata source or the
tzgen-java/* usr/share/javazi/ compiler ?????
:D :lol: :D
[/edit]

nooby
Posts: 10369
Joined: Sun 29 Jun 2008, 19:05
Location: SwedenEurope

#12 Post by nooby »

My very noob take on all this is that it is a very important thing
due to the programs think there is something bad happening
when one clock says one thing and the time on a file say it is
done in the future. So it stop and ask things instead of doing
what one want.

Such can stop also programs that is supposed to just work.

Scheduled recordings of heart whatever :)

So if somebody good at logic could sort it up and once for all set it straight!

Either recommend we adjust the RTC clock in BIOS or always chose Local and then remember to adjust manually two times a year.

Not sure what is most practical. Anyway I sure hope somebody look into it.
I use Google Search on Puppy Forum
not an ideal solution though

User avatar
L18L
Posts: 3479
Joined: Sat 19 Jun 2010, 18:56
Location: www.eussenheim.de/

Setting Time Zone

#13 Post by L18L »

Karl Godt wrote:...
Therefore TZ='Europe/Berlin' will be used.
Local time is now: Thu Oct 20 15:32:56 CEST 2011.
Universal Time is now: Thu Oct 20 13:32:56 UTC 2011.
Is the above information OK?
1) Yes
2) No
#? 2
Wrong answer
1) Yes is right :wink:

UTC does NOT have summer time :lol:
___________________________________________

Showing region/city (Australia/Perth) in initial dialog is now hopefully preventing you and me from using GMT+1 which has NO summertime
http://bkhome.org/blog/?viewDetailed=02548

User avatar
Karl Godt
Posts: 4199
Joined: Sun 20 Jun 2010, 13:52
Location: Kiel,Germany

Re: Setting Time Zone

#14 Post by Karl Godt »

L18L wrote:
Karl Godt wrote:...
Therefore TZ='Europe/Berlin' will be used.
Local time is now: Thu Oct 20 15:32:56 CEST 2011.
Universal Time is now: Thu Oct 20 13:32:56 UTC 2011.
Is the above information OK?
1) Yes
2) No
#? 2
Wrong answer
1) Yes is right :wink:

UTC does NOT have summer time :lol:
WRONG ANSWER BECAUSE :
though my clock says 08:31:xy PM
Local time is now: Thu Oct 20 15:32:56 CEST 2011. WOULD BE 5 HRS BACK

oui

#15 Post by oui »

as long you have only Windows (I have ab. 5..6 years no windows any more, only on the PC of my wife is an old XP version because of the online banking with chip card as not possible on Linux PC!) and one or more as one Puppy version on the hard disk the problem is to know:

which time is setting up an using Windows and do the same.

next problem appears if you use other very imperious linux as Debian:

Debian installs somewhat and you have to see how to live in tolerance with it :lol: !

but it would probably possible with a only one hit in Rox on an adequate Debian file, what Debian did install :roll: . the only one question is to kown:

where are the
* time base,
* time and
* date
settings saved in new versions of Debian (Slackware, Ubuntu, etc. ...)!

and to handle adequate after that....

User avatar
Karl Godt
Posts: 4199
Joined: Sun 20 Jun 2010, 13:52
Location: Kiel,Germany

#16 Post by Karl Godt »

I have tested the /usr/sbin/timezone-set script @slacko and reverting the +/- works for me .
I guess it is a leftover or a workaround for wrong configured files @/usr/share/zoneinfo/*

Since tzselect is part of the [e]glibc package it might be also related to the /lib/glibc* --version .

Diff :

Code: Select all

--- /initrd/pup_ro2/usr/sbin/timezone-set	2010-05-26 06:47:03.000000000 -0100
+++ /usr/sbin/timezone-set	2011-10-29 22:02:16.000000000 -0100
@@ -25,18 +25,20 @@ if [ -e /etc/localtime ];then
  CZONE="`readlink /etc/localtime`"
  DEFTAG="`readlink /etc/localtime | sed -e 's%/usr/share/zoneinfo/%%'`"
 else
- CZONE='/usr/share/zoneinfo/Etc/GMT-8' #these have opposite sign.
- DEFTAG='Etc/GMT-8'
+ CZONE='/usr/share/zoneinfo/Etc/GMT+8' #these have opposite sign.
+ DEFTAG='Etc/GMT+8'
 fi
-if [ "`echo -n "$DEFTAG" | grep 'GMT' | grep '\+'`" = "" ];then
- DEFTAG="`echo -n "$DEFTAG" | sed -e 's%Etc/%%' | tr "\-" "\+"`"
-else
- DEFTAG="`echo -n "$DEFTAG" | sed -e 's%Etc/%%' | tr "\+" "\-"`"
+#if [ "`echo -n "$DEFTAG" | grep 'GMT' | grep '\+'`" = "" ];then
+# DEFTAG="`echo -n "$DEFTAG" | sed -e 's%Etc/%%' | tr "\-" "\+"`"
+#else
+# DEFTAG="`echo -n "$DEFTAG" | sed -e 's%Etc/%%' | tr "\+" "\-"`"
+#fi
+if [ "`echo -n "$DEFTAG" | grep 'GMT'`" != "" ];then
+DEFTAG=${DEFTAG#*/}
 fi
-
 #100526 screen out UTC timezone, causes confusion...
 ZONEINFO="`find /usr/share/zoneinfo -type f | grep -v '\.tab$' | grep -v 'UTC' | sed -e 's%/usr/share/zoneinfo/%%' | sed -e 's%Etc/%%' | tr ' ' '_' | sort | tr '\n' ' '`"
-
+echo "$DEFTAG"
 ZONECHOICES=""
 for ONEZONE in $ZONEINFO
 do
@@ -91,11 +93,11 @@ fi
 
 ZONERETVAL="`cat /tmp/zoneretval`"
 
-if [ "`echo -n "$ZONERETVAL" | grep 'GMT' | grep '\+'`" = "" ];then
- ZONERETVAL="`echo -n "$ZONERETVAL" | tr "\-" "\+"`"
-else
- ZONERETVAL="`echo -n "$ZONERETVAL" | tr "\+" "\-"`"
-fi
+#if [ "`echo -n "$ZONERETVAL" | grep 'GMT' | grep '\+'`" = "" ];then
+# ZONERETVAL="`echo -n "$ZONERETVAL" | tr "\-" "\+"`"
+#else
+# ZONERETVAL="`echo -n "$ZONERETVAL" | tr "\+" "\-"`"
+#fi
 
 #validity check...
 [ "`echo "$ZONEINFO" | grep "$ZONERETVAL"`" = "" ] && exit

User avatar
tasmod
Posts: 1460
Joined: Thu 04 Dec 2008, 13:53
Location: North Lincolnshire. UK
Contact:

#17 Post by tasmod »

Karl,

The problems are not of Puppys making as I stated but a Linux convention.

I've no idea why it's done this way, it just is.

Not Puppy's fault but standard LInux:-

tzdata is in reverse notation.

date doesn't reverse GMT report

As I mentioned earlier, hwclock works to set the rtc BUT reports back in localtime format. (What a confusion)

===

Psync has had a bug introduced a few versions back when I catered for the GMT/UTC users.
It would not sync the rtc clock but would sync the software system clock so most users wouldn't have noticed.

It was just a single character to fix it but I was surprised no-one had noticed it.

Version 2.7 of Psync now syncs the rtc and also reports what the DST dates are if timezone set. (I must stop using the word locale, I tend to think of this as everything related to zone, country etc.)

According to the BBC video link about timezones I posted in announcements, GMT-1 is only a couple of areas. ( I remember the Azores as one)
If it's still on it's well worth the look, very interesting. Especially Antarctica and the timezone use there, where in effect all timezones meet !!
Arctic is different as there are few people there compared to the Antarctic study groups.
Rob
-
The moment after you press "Post" is the moment you actually see the typso 8)

User avatar
Karl Godt
Posts: 4199
Joined: Sun 20 Jun 2010, 13:52
Location: Kiel,Germany

#18 Post by Karl Godt »

It was just a single character to fix it but I was surprised no-one had noticed it.
I have never used it , as perhaps 1/3 of the Menu entries .

Post Reply