From: Kevin D. <ke...@ph...> - 2003-06-26 15:41:17
|
Thanks nao. I'll give this a try when I get a chance. On Sun, 22 Jun 2003 10:05:28 +0900 (JST) nao <na...@to...> wrote: > Hi, > > I made a patch which fixes the DST problem. The idea is quite simple: > assume DST if eBay says so. Pached bidwatcher works GREAT for me. > > Enjoy! > > Naoki Hamada > na...@to... > > diff -u bidwatcher-1.3.8/bidwatcher.cpp bidwatcher-work/bidwatcher.cpp > --- bidwatcher-1.3.8/bidwatcher.cpp Tue May 27 09:26:15 2003 > +++ bidwatcher-work/bidwatcher.cpp Sun Jun 15 08:51:35 2003 > @@ -191,6 +191,8 @@ > > gint errorstat_timeout; > > +bool dst=FALSE; > + > void DoEmail(char *name, char *auctionid); > static void deleteitem_handler(GtkMenuItem *MenuItem, gpointer data); > static void flush_handler(GtkMenuItem *MenuItem, gpointer data); > @@ -4285,11 +4287,8 @@ > #error "Don't know how to get current timezone!" > #endif > > - // ebay is GMT-8hrs > - // BUT -7 during PDT! so this is a poor assumption. > - // (so if you are off by an hour in bw, try setting 8 to 7.) > - // How do we know when DST is in effect? > - local_timeDiff = -8*60*60 - gmt_time; // get real diff > + // ebay is GMT-8hrs, BUT -7 during PDT! > + local_timeDiff = (dst?(-7):(-8))*60*60 - gmt_time; // get real > diff > > showStatus(""); > > diff -u bidwatcher-1.3.8/bidwatcher.h bidwatcher-work/bidwatcher.h > --- bidwatcher-1.3.8/bidwatcher.h Tue May 27 09:26:34 2003 > +++ bidwatcher-work/bidwatcher.h Sun Jun 15 08:46:06 2003 > @@ -386,6 +386,8 @@ > extern struct auctioninfo * auction[MAXAUCS+1]; > extern string30 auctionlist[MAXAUCS + 1]; > > +extern bool dst; > + > > /* so many return codes! */ > #define ERROR -1 > diff -u bidwatcher-1.3.8/helpers.cpp bidwatcher-work/helpers.cpp > --- bidwatcher-1.3.8/helpers.cpp Sun May 25 15:05:21 2003 > +++ bidwatcher-work/helpers.cpp Sun Jun 15 08:57:53 2003 > @@ -1364,6 +1364,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; > + if (strcmp("PDT", scratch) == 0) dst = TRUE ; > > time_t theTime = mktime(&ebay_time) - new_time_t; > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: INetU > Attention Web Developers & Consultants: Become An INetU Hosting > Partner. Refer Dedicated Servers. We Manage Them. You Get 10% Monthly > Commission! INetU Dedicated Managed Hosting > http://www.inetu.net/partner/index.php > _______________________________________________ > Bidwatcher-devel mailing list > Bid...@li... > https://lists.sourceforge.net/lists/listinfo/bidwatcher-devel -- /* ke...@ph... */ /* http://pheared.net */ |