public inbox for gnats-prs@sourceware.org
help / color / mirror / Atom feed
From: Yngve Svendsen <yngve.svendsen@clustra.com>
To: nobody@sourceware.cygnus.com
Cc: gnats-prs@sourceware.cygnus.com
Subject: Re: gnatsweb/235: Arrival-Date/Date-format in query-result is wrong
Date: Wed, 15 Aug 2001 14:26:00 -0000	[thread overview]
Message-ID: <20010815182401.22974.qmail@sourceware.cygnus.com> (raw)

The following reply was made to PR gnatsweb/235; it has been noted by GNATS.

From: Yngve Svendsen <yngve.svendsen@clustra.com>
To: aavictor@email.com, gnats-gnats@sourceware.cygnus.com
Cc: gnats-devel@sourceware.cygnus.com
Subject: Re: gnatsweb/235: Arrival-Date/Date-format in query-result is
  wrong
Date: Thu, 16 Aug 2001 00:31:14 +0200

 >Background : End users complain the arrival-time is not relevent to 
 >Hongkong time. So, I change the timezone of system clock from CST to HKT , 
 >and reboot. After that,
 >I create a test request on "Thu Aug 09 10:10:00 HKT 2001" , and output in 
 >Query Results is "1970-01-01 07:59:59".
 >The arrival time of this request is -1 in index (gnats-adm directory)
 
 (I am CCing the gnats-devel mailing list on this, as I think others might 
 be interested in this)
 
 Interesting problem. It seems to be a side-effect of GNATS not having heard 
 of the HKT time zone name abbreviation, and I think it is caused by the 
 following:
 
 When GNATS receives a problem report, it takes the current date and time 
 from the clock on the server and puts that into the Arrival-Date field of 
 the GNATS report. No parsing is involved, so it doesn't matter if the 
 server uses a format that GNATS doesn't understand.
 
 However, GNATS also uses an index file to make searching faster. The 
 Arrival Date is one of the fields in this index, and when creating it, 
 GNATS attempts to parse the date string into an internal format. Not 
 knowing what to make of the "HKT" in the date string, it seems to default 
 to putting "-1" into the index field. This -1 is what causes the wrong date 
 which you are seeing in the Gnatsweb query results.
 
 So, all in all, this is not really a Gnatsweb problem, but a problem in 
 GNATS itself. There are myriads of different timezone abbreviations, and 
 GNATS unfortunately doesn't know about all of them. The upcoming GNATS 4 
 has largely solved this by using numeric time zone strings relative to UTC, 
 like +0200 or -0800.
 
 I think the best workaround for you would be to set a timezone on your 
 server which is known to GNATS. As far as I can see, HKT is UTC+8 hours, so 
 you should get by with either of the following, cut from the GNATS 
 getdate.y file:
 
      { "awst",   tZONE,     -HOUR (8) }, /* West Australian Standard */
      { "cct",    tZONE,     -HOUR (8) }, /* China Coast, USSR Zone 7 */
      { "pht",    tZONE,     -HOUR (8) }, /* Asia Manila */
      { "wst",    tZONE,     -HOUR (8) }, /* West Australian Standard */
 
 You could also try to insert the HKT timezone in the proper location of the 
 getdate.c file and recompile GNATS. The format of the time zone entries in 
 getdate.c should be more or less self-explanatory.
 
 By the way, you should definitely update your Gnatsweb installation. 
 Functionality has improved quite a bit lately, and versions up to and 
 including Gnatsweb 2.8.1 have a nasty security hole. You can find out more 
 about this at http://sources.redhat.com/gnats/
 
 Yngve Svendsen
 Gnatsweb maintainer
 


             reply	other threads:[~2001-08-15 14:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-08-15 14:26 Yngve Svendsen [this message]
  -- strict thread matches above, loose matches on Subject: below --
2001-08-08 21:14 aavictor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20010815182401.22974.qmail@sourceware.cygnus.com \
    --to=yngve.svendsen@clustra.com \
    --cc=gnats-prs@sourceware.cygnus.com \
    --cc=nobody@sourceware.cygnus.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).