Default Time zone/City for Serbia(Europe) Should be Belgrade

Bug #140934 reported by Nikola M
8
Affects Status Importance Assigned to Milestone
system-tools-backends
Fix Released
Unknown
system-tools-backends (Ubuntu)
Triaged
Medium
Martin Pitt

Bug Description

Binary package hint: debian-installer

Default Time zone/City for Serbia(Europe) Should be Belgrade,
not Sarajevo..

Belgrade is capital of Serbia and should be default for time zone settings
for Serbia.
http://en.wikipedia.org/wiki/Serbia
http://en.wikipedia.org/wiki/Belgrade

By mistake, it is put different town in Ubuntu, that is in administrative boundaries of Bosnia, not Serbia.
It should be Belgrade.
Same in 7.04 and in 7.10 Tribe install.

Revision history for this message
Colin Watson (cjwatson) wrote :

I can't reproduce this with a current Gutsy daily build (but to my knowledge nothing changed here since the last Tribe release); I selected English as my language, Serbia as my country, and got Belgrade as my timezone. Are you seeing the timezone in some piece of graphical user interface? What does /etc/timezone say? Sarajevo is the same timezone as Belgrade, so maybe something is displaying one as the other.

Changed in tzsetup:
assignee: nobody → kamion
status: New → Incomplete
Revision history for this message
Nikola M (nikolam) wrote :

I see Europe/Sarajevo is selected in "time and date" setting applet in system programs group
after install as location Serbia.
In present state user needs to change it manually to Serbia/Belgrade upon install.

Revision history for this message
Nikola M (nikolam) wrote :

$ cat /etc/timezone
Europe/Belgrade

It is still going on in latest RC of Xubuntu 8.10 Interpid.

when time-admin is started, it is Sarajevo that is listed, instead of Europe/Belgrade, as it should be
when Serbia is selected.

Btw, I am using Xubuntu 8.04.1 LTS on 64-bit intel/amd (amd64) (8.10 is also affected)

Revision history for this message
Филип Маљковић (dungodung) wrote :

I can confirm the bug (I'm currently using hardy).

Revision history for this message
Colin Watson (cjwatson) wrote :

This is a system-tools-backends bug. Observe the following code in /usr/share/system-tools-backends-2.0/scripts/Time/TimeDate.pm:

  *TZLIST = &Utils::File::open_read_from_names($zoneinfo_dir . "/zone.tab");
  if (not *TZLIST) { return; }

  &Utils::Report::do_report ("time_timezone_scan");

  # Get the filesize for /etc/localtime so that we don't have to execute
  # a diff for every file, only for file with the correct size. This speeds
  # up loading
  $size_search = (stat ($local_time_file))[7];

  while (<TZLIST>)
  {
    if (/^\#/) { next; } # Skip comments.
    ($d, $d, $zone) = split /[\t ]+/, $_; # Get 3rd column.
    chomp $zone; # Remove linefeeds.

    # See if this zone file matches the installed one.
    &Utils::Report::do_report ("time_timezone_cmp", $zone);
    $size_test = (stat("$zoneinfo_dir/$zone"))[7];
    if ($size_test eq $size_search)
    {
      if (!&Utils::File::run ("diff $zoneinfo_dir/$zone $local_time_file"))
      {
        # Found a match.
        last;
      }
    }

    $zone = "";
  }

  close (TZLIST);
  return $zone;

This means that the first zone listed in /usr/share/zoneinfo/zone.tab whose zone file matches the contents of /etc/localtime (since we don't set up /etc/localtime as a symlink for various other good reasons) will be used. In this case, that happens to be Europe/Sarajevo, because Europe/Sarajevo is a copy of Europe/Belgrade and is the default for Bosnia, which comes before Serbia in zone.tab.

I think the correct fix for this bug is to attempt to open /etc/timezone and check whether the timezone named there matches the contents of /etc/localtime, before doing this exhaustive search. That would be faster as well.

Changed in tzsetup:
importance: Undecided → Medium
status: Incomplete → Triaged
Changed in system-tools-backends:
assignee: kamion → nobody
Revision history for this message
markor (markoresko) wrote :

I just checked /etc/timezone
and it set itself on Europe/Sarajevo after reboot.
(Even when I set it to Europe/Belgrade)

When I seti it to Europe/Belgrade on "time and date" applet
it stays on that in e/etc/timezone for now
(Until I start "time and date" applet again)

When I open
sudo mousepad /etc/localtime, I get:
TZif2

when I do cat /etc/localtime
I get weird output.

$ cat /etc/localtime >> etc.localtime.txt
$ nano etc.localtime.txt

TZif2^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^F^@^@^@^F^@^@^@^@^@^@^@x^@^@^@^F^@^@^$
^P\�^Q^P]��^P^^?�^P_��^P`_�^Pa}��b?�^Pc]̐d^_�^Pe=��f^H��g^]��g藐h�r�iȗy�jݗT�k�[�^P^@^@^@^@\�^Q^P^@^@^@^@]��^P^@^@^@^@^^?�^P^@^@^@^@_��^P^@^@^@^@`_�^P^@^@^@^@a}$
CET-1CEST,M3.5.0,M10.5.0/3

Martin Pitt (pitti)
Changed in system-tools-backends:
assignee: nobody → pitti
status: Triaged → In Progress
Changed in system-tools-backends:
status: Unknown → New
Martin Pitt (pitti)
Changed in system-tools-backends:
status: In Progress → Confirmed
Revision history for this message
Colin Watson (cjwatson) wrote :

markor: /etc/localtime contains compiled time zone information, and is not supposed to be human-readable.

Revision history for this message
markor (markoresko) wrote :

Thanks Collin for telling me this :) I am willing to test this bug from bottom to top to make it gone.
I use 64-bit system with kvm and virtualbox and I can do testing all day long if it would help fixing this bug. Feel free to contact me.

Martin Pitt (pitti)
Changed in system-tools-backends (Ubuntu):
status: Confirmed → Triaged
Revision history for this message
Savvas Radevic (medigeek) wrote :
Changed in system-tools-backends:
status: New → Confirmed
Changed in system-tools-backends:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.