Help, auctions remain open after closing time

A place to discuss and receive support for the Web Auction application.

Postby Photon » Mon Oct 01, 2007 2:34 am

I have a problem in which auctions reach their closing time and still allow bidding. Even if I edit the closing time to an earlier value, they still remain open.
Test products that I open will get closed if there are no bids, , but as soon as bids are submitted, the auction will fail to close.

The only change I did was the timezone fix by using putenv

I also noticed that the "Opening Time" field disappears from display when there are bids.
Photon
 
Posts: 5
Joined: Wed Dec 31, 1969 5:00 pm

Postby shannah » Mon Oct 01, 2007 7:58 am

The best I can guess is that you entered the product into the the system before setting the timezone. Therefore the closing time will still be on the old timezone (because it gets saved as a unix timestamp).

-Steve
--
Steve Hannah
@shannah78 (on twitter)
sjhannah.com blog
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Postby Photon » Mon Oct 01, 2007 12:08 pm

I thought so too, but here is an observation and a test I did:
1. I could see the auction still open even after 18 hours past closing time. Time zone differences cannot account for this.
2. I went ahead and added a new product that ends within a few minutes. Then, I used another browser with a different user logged in to submit a bid. When the closing time passed, I could see the same effect, and the auction remained open.

For now, I have to manually delete the auction when the time expires to make sure no other people bid on a closed auction.
Photon
 
Posts: 5
Joined: Wed Dec 31, 1969 5:00 pm

Postby shannah » Fri Oct 05, 2007 11:56 am

Hmm.. I'm not sure what could be causing this. I can't seem to reproduce this behavior on any of my set ups.

-Steve
--
Steve Hannah
@shannah78 (on twitter)
sjhannah.com blog
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Postby duane » Sun Oct 07, 2007 4:19 pm

I have exactly the same issue so there's a problem somewhere. Bids are able to be made after the auction has closed. This of course is annoying the bidders and makes us look bad.

Any help is much appreciated.
duane
 
Posts: 2
Joined: Wed Dec 31, 1969 5:00 pm

Postby shannah » Mon Oct 08, 2007 9:54 am

What version of PHP/OS/server are you using?
-Steve
--
Steve Hannah
@shannah78 (on twitter)
sjhannah.com blog
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Postby shannah » Mon Oct 08, 2007 10:04 am

This is all handled in the tables/products/products.php file, in the methods:
Code: Select all
function field__isOpen(&$record){
        return ($record->val('opening_time_seconds') < time() and time() < $record->val('cooked_closing_time_seconds'));
    }
   
   
    function field__cooked_closing_time_seconds(&$record){
        $closing_time = $record->strval('closing_time');
        if ( !$closing_time ){
            $app =& Dataface_Application::getInstance();
            $closing_time = $app->_conf['df_auction']['closing_time'];
        }
       
        $closing_time_seconds = strtotime($closing_time);
        $high_bid = $record->val('high_bid');
        if ( $high_bid ){
            $bid_time = $high_bid->strval('time_of_bid');
            $closing_time_seconds = max($closing_time_seconds, strtotime($bid_time));
        }
        return $closing_time_seconds;
    }


It's pretty simple. The field__cooked_closing_time_seconds() method returns the unix timestamp of when the
the product will be closed. And the field__isOpen() method returns a boolean value of whether or not the
auction is open.

To debug this issue, you can try putting some echo statements in at various places to see where it is going wrong.

-Steve
--
Steve Hannah
@shannah78 (on twitter)
sjhannah.com blog
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm


Return to Web Auction Discussion

Who is online

Users browsing this forum: No registered users and 26 guests

cron
Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved