RPM Community Forums

Mailing List Message of <rpm-cvs>

[CVS] RPM: rpm/ CHANGES rpm/build/ parseChangelog.c

From: Jeff Johnson <jbj@rpm5.org>
Date: Wed 20 Jun 2007 - 17:58:15 CEST
Message-Id: <20070620155815.52EB93484EA@rpm5.org>
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  ____________________________________________________________________________

  Server: rpm5.org                         Name:   Jeff Johnson
  Root:   /v/rpm/cvs                       Email:  jbj@rpm5.org
  Module: rpm                              Date:   20-Jun-2007 17:58:15
  Branch: HEAD                             Handle: 2007062016581401

  Modified files:
    rpm                     CHANGES
    rpm/build               parseChangelog.c

  Log:
    - rse: calculate timezone directly, don't rely on timezone variable.

  Summary:
    Revision    Changes     Path
    1.1379      +1  -0      rpm/CHANGES
    2.30        +6  -2      rpm/build/parseChangelog.c
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: rpm/CHANGES
  ============================================================================
  $ cvs diff -u -r1.1378 -r1.1379 CHANGES
  --- rpm/CHANGES	20 Jun 2007 15:55:39 -0000	1.1378
  +++ rpm/CHANGES	20 Jun 2007 15:58:14 -0000	1.1379
  @@ -1,4 +1,5 @@
   4.5 -> 5.0:
  +    - rse: calculate timezone directly, don't rely on timezone variable.
       - rse: remove the hysterical bzip2 interface.
       - rse: add the missing Autoconf glue code for using mmap(2) in the code
       - rse: (temporarily) remove partial Lua/libsyck support from build environment
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/build/parseChangelog.c
  ============================================================================
  $ cvs diff -u -r2.29 -r2.30 parseChangelog.c
  --- rpm/build/parseChangelog.c	25 May 2007 17:35:56 -0000	2.29
  +++ rpm/build/parseChangelog.c	20 Jun 2007 15:58:15 -0000	2.30
  @@ -34,6 +34,7 @@
   	/*@modifies *secs @*/
   {
       struct tm time;
  +    time_t timezone_offset;
       char * p, * pe, * q, ** idx;
       char * date = strcpy(alloca(strlen(datestr) + 1), datestr);
   /*@observer@*/ static char * days[] =
  @@ -89,8 +90,11 @@
       *secs = mktime(&time);
       if (*secs == -1) return -1;
   
  -    /* adjust to GMT */
  -    *secs += timezone;
  +    /* determine timezone offset */
  +    timezone_offset = mktime(gmtime(secs)) - *secs;
  +
  +    /* adjust to UTC */
  +    *secs += timezone_offset;
   
       return 0;
   }
  @@ .
Received on Wed Jun 20 17:58:15 2007
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.