[Bug 1078087] Re: extern variable tzname is not set correctly for Australia/Sydney timezone

vulgar brian8702 at sbcglobal.net
Tue Jun 11 15:35:25 UTC 2013


Sorry for the slow follow up, I didn't notice the comment hit my inbox and forgot about this until it reared its head again.  Perhaps 'inconvenient' is a better description than incorrect, but users dealing with multiple time zones are being confused between Australia and US when they see the abbreviations on timestamps; the amount of display space allocated to this is limited, which is why abbreviations are being used, but I would expect AEST/AEDT instead of EST/EDT as per:
    http://en.wikipedia.org/wiki/Time_in_Australia
and
    http://www.timeanddate.com/library/abbreviations/timezones/au/

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to tzdata in Ubuntu.
https://bugs.launchpad.net/bugs/1078087

Title:
  extern variable tzname is not set correctly for Australia/Sydney
  timezone

Status in “tzdata” package in Ubuntu:
  New

Bug description:
  I compile and run the following C program on a machine whose default
  timezone is "America/New_York":

  #include <stdlib.h>
  #include <stdio.h>
  #include <string.h>
  #include <time.h>
  #include <stdint.h>
  #include <assert.h>

  void printTimezone(void) {
    printf("Timezone is now '%s/%s', %ld seconds West of UTC\n",
  	 tzname[0], tzname[1], timezone);
  }

  int main(const int argc, const char *argv[]) {
    tzset();
    printTimezone();
    setenv("TZ", "Asia/Hong_Kong", 1);
    tzset();
    printTimezone();
    setenv("TZ", "Europe/London", 1);
    tzset();
    printTimezone();
    setenv("TZ", "Australia/Sydney", 1);
    tzset();
    printTimezone();
  }

  The resulting output is:

  Timezone is now 'EST/EDT', 18000 seconds West of UTC
  Timezone is now 'HKT/HKST', -28800 seconds West of UTC
  Timezone is now 'GMT/BST', 0 seconds West of UTC
  Timezone is now 'EST/EST', -36000 seconds West of UTC

  As can be seen from the last line of the output, the values of
  tzname[0] and tzname[1] are incorrect for Australia/Sydney (seem to be
  set similarly to America/New_York) even though the value of timezone
  (i.e. seconds West of UTC) appears to be correct.

  ProblemType: Bug
  DistroRelease: Ubuntu 10.04
  Package: tzdata 2012e-0ubuntu0.10.04
  ProcVersionSignature: Ubuntu 2.6.32-45.99-generic 2.6.32.60+drm33.26
  Uname: Linux 2.6.32-45-generic x86_64
  Architecture: amd64
  Date: Mon Nov 12 16:18:45 2012
  InstallationMedia: Ubuntu 10.04.1 LTS "Lucid Lynx" - Release amd64 (20100816.1)
  PackageArchitecture: all
  ProcEnviron:
   PATH=(custom, user)
   LANG=en_US.utf8
   SHELL=/bin/bash
  SourcePackage: tzdata

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/tzdata/+bug/1078087/+subscriptions




More information about the foundations-bugs mailing list