Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: need help with comparing time..

by RedElk (Hermit)
on May 21, 2015 at 14:53 UTC ( [id://1127358]=note: print w/replies, xml ) Need Help??


in reply to need help with comparing time..

Like Choroba has already pointed out, use a module to handle the date/time calculations for you. Use that module to evaluate the products_last_modified value, something he also pointed out. Then, it looks like you could update your if statement to include another clause, something along the lines of:

# update when price/stock conditions met if (($data->{'price'} <= $product_price && $data->{'quantity'} > 0). || ($product_quantity == 0 && $data->{'quantity'} > 0) || ($products_last_modified <= 12))

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1127358]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (7)
As of 2024-04-23 09:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found