diff options
author | tron <tron@pkgsrc.org> | 2003-03-31 07:57:24 +0000 |
---|---|---|
committer | tron <tron@pkgsrc.org> | 2003-03-31 07:57:24 +0000 |
commit | ee0eb406d5175a75eef2d4756b9301decf2dbca2 (patch) | |
tree | 224077e24a2447e04c67fd0d0119b5c0b9b4666f | |
parent | f80c24d98a652c44dd4468fb357d78f83276e985 (diff) | |
download | pkgsrc-ee0eb406d5175a75eef2d4756b9301decf2dbca2.tar.gz |
Fix time difference problem which shows up when the local system is on
DST and eBay is not. Based on a suggestion from Bernd Ernesti.
-rw-r--r-- | misc/bidwatcher/Makefile | 3 | ||||
-rw-r--r-- | misc/bidwatcher/distinfo | 5 | ||||
-rw-r--r-- | misc/bidwatcher/patches/patch-aa | 21 | ||||
-rw-r--r-- | misc/bidwatcher/patches/patch-ac | 30 |
4 files changed, 52 insertions, 7 deletions
diff --git a/misc/bidwatcher/Makefile b/misc/bidwatcher/Makefile index 1c87b56a8ad..04dfdcc7dc6 100644 --- a/misc/bidwatcher/Makefile +++ b/misc/bidwatcher/Makefile @@ -1,6 +1,7 @@ -# $NetBSD: Makefile,v 1.21 2002/12/23 22:46:55 tron Exp $ +# $NetBSD: Makefile,v 1.22 2003/03/31 07:57:24 tron Exp $ DISTNAME= bidwatcher-1.3.7 +PKGREVISION= 1 CATEGORIES= misc MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=bidwatcher/} diff --git a/misc/bidwatcher/distinfo b/misc/bidwatcher/distinfo index 305c38452c5..0d0bd6c0826 100644 --- a/misc/bidwatcher/distinfo +++ b/misc/bidwatcher/distinfo @@ -1,6 +1,7 @@ -$NetBSD: distinfo,v 1.19 2002/12/30 02:09:25 dmcmahill Exp $ +$NetBSD: distinfo,v 1.20 2003/03/31 07:57:24 tron Exp $ SHA1 (bidwatcher-1.3.7.tar.gz) = 92d30c14c7df96307fb99052f22661281c774dba Size (bidwatcher-1.3.7.tar.gz) = 145540 bytes -SHA1 (patch-aa) = 57cc45107a53f54aae6b8fa22e2283fbeebd0516 +SHA1 (patch-aa) = 26d1411fe3aa8c46d1b9491c52ac4042c9a8ce43 SHA1 (patch-ab) = 85052062bd165ba0ae3de05c887e3236c5ae7da7 +SHA1 (patch-ac) = 2c191475f27847e602ac24ed04f070bb8aa9768d diff --git a/misc/bidwatcher/patches/patch-aa b/misc/bidwatcher/patches/patch-aa index f11610fae49..1a5b62912b1 100644 --- a/misc/bidwatcher/patches/patch-aa +++ b/misc/bidwatcher/patches/patch-aa @@ -1,8 +1,8 @@ -$NetBSD: patch-aa,v 1.14 2002/12/30 02:09:26 dmcmahill Exp $ +$NetBSD: patch-aa,v 1.15 2003/03/31 07:57:24 tron Exp $ ---- bidwatcher.cpp.orig Mon Dec 23 02:49:08 2002 -+++ bidwatcher.cpp -@@ -4093,7 +4093,7 @@ void TimeSync() +--- bidwatcher.cpp.orig 2002-12-23 08:49:08.000000000 +0100 ++++ bidwatcher.cpp 2003-03-31 09:53:56.000000000 +0200 +@@ -4093,7 +4093,7 @@ if (strlen(HtmlBuff) < 1000) { #ifdef DEBUG_NETWORK @@ -11,3 +11,16 @@ $NetBSD: patch-aa,v 1.14 2002/12/30 02:09:26 dmcmahill Exp $ #endif continue; } +@@ -4139,7 +4139,11 @@ + int local_timeDiff; + + #if defined(HAVE_GMTIME) +- gmt_time = time_now - mktime(gmtime(&time_now)); ++ struct tm gmt_tm; ++ ++ gmt_tm = *gmtime(&time_now); ++ gmt_tm.tm_isdst = -1; ++ gmt_time = time_now - mktime(&gmt_tm); + #elif defined(HAVE_TM_ZONE) + struct tm * timeStruct = localtime(&time_now); + gmt_time = timeStruct->tm_gmtoff; diff --git a/misc/bidwatcher/patches/patch-ac b/misc/bidwatcher/patches/patch-ac new file mode 100644 index 00000000000..196bc91be23 --- /dev/null +++ b/misc/bidwatcher/patches/patch-ac @@ -0,0 +1,30 @@ +$NetBSD: patch-ac,v 1.6 2003/03/31 07:57:25 tron Exp $ + +--- helpers.cpp.orig 2002-12-21 09:00:42.000000000 +0100 ++++ helpers.cpp 2003-03-31 09:47:10.000000000 +0200 +@@ -1347,7 +1347,6 @@ + std::istrstream streamBuff(buffer); + #endif + struct tm ebay_time; +- ebay_time.tm_isdst = 0; + while(streamBuff) { + streamBuff.getline(lineBuff, 1024, '\n'); + /* +@@ -1380,9 +1379,6 @@ + if (scratch) strcpy(chMin, scratch); + scratch = strtok(0, " "); + if (scratch) strcpy(chSec, scratch); +- scratch = strtok(0, "<"); +- if (scratch && strcmp( scratch, "PDT" ) == 0 ) +- ebay_time.tm_isdst = 1; + break; + } + } +@@ -1406,6 +1402,7 @@ + else if (strcmp("Nov", chMonth) == 0) ebay_time.tm_mon = 10; + else ebay_time.tm_mon = 11; + ebay_time.tm_year = atoi(chYear) - 1900; ++ ebay_time.tm_isdst = -1; + + time_t theTime = mktime(&ebay_time) - new_time_t; + |