Menu

#737 Time update isue (or maybe timezone)

v1.0 (example)
closed-fixed
nobody
5
2018-06-19
2017-11-03
Wasp
No

Hi,

run into the the problem that esniper seems to be confused about the time to update the auction/cache to make a bid. Actually it seems to be one hour off. When the auction ended already console output still states to sleep 50 minutes (auction ending in 1 hour -- esniper thinks). Local system time is set fine.

Esniper version is 2.33.0 (tarball source) with patched auction.c and history.c file from CVS.

Discussion

  • Michael S.

    Michael S. - 2017-11-05

    See patch attached.

    RCS file: /cvsroot/esniper/esniper/history.c,v
    retrieving revision 1.35
    diff -u -p -r1.35 history.c
    --- history.c   25 Oct 2017 18:01:22 -0000  1.35
    +++ history.c   5 Nov 2017 16:01:58 -0000
    @@ -338,7 +338,7 @@ parseBidHistoryInternal(pageInfo_t *pp, 
                strncpy(minutes, getNonTag(mp), 2);
            }
            else
    
    -           strcpy(seconds, "0");
    +           strcpy(minutes, "0");
            if (memStr(mp, "\"_counter_itemEndDate_second\"")) {
                             memChr(mp, '>');
                             memSkip(mp, 1);
    @@ -346,8 +346,18 @@ parseBidHistoryInternal(pageInfo_t *pp, 
            }
            else
                strcpy(seconds, "0");
    -       sprintf(tmpTimeLeft, "%s days %s hours %s mins %s secs",
    -           days, hours, minutes, seconds);
    +
    +       /* Scan again, if nothing found (here the old format appears again) */
    +       if ( !strcmp(days, "0") && !strcmp(hours, "0") && !strcmp(minutes, "0") && !strcmp(seconds, "0") ) {
    +           memReset(mp);
    +           if (memStr(mp, ">Time left:</span>")) {
    +              getNonTag(mp); /* Skip */
    +              strncpy(tmpTimeLeft, getNonTag(mp), 128);
    +           }
    +       }   
    +       else
    +           sprintf(tmpTimeLeft, "%s days %s hours %s mins %s secs",
    +                       days, hours, minutes, seconds);
            aip->remainRaw = myStrdup(tmpTimeLeft);
            aip->remain = getSeconds(tmpTimeLeft);
                     if (aip->remain < 0) {
    cvs diff: Diffing frontends
    cvs diff: Diffing frontends/php
    

    See http://esniper.cvs.sourceforge.net/viewvc/esniper/esniper/history.c?sortby=date&view=log

     

    Last edit: Michael S. 2017-11-07
  • Bodo

    Bodo - 2018-06-19
    • status: open --> closed-fixed
     

Log in to post a comment.

MongoDB Logo MongoDB