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 /misc/bidwatcher/patches | |
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.
Diffstat (limited to 'misc/bidwatcher/patches')
-rw-r--r-- | misc/bidwatcher/patches/patch-aa | 21 | ||||
-rw-r--r-- | misc/bidwatcher/patches/patch-ac | 30 |
2 files changed, 47 insertions, 4 deletions
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; + |