discount end date set to ~2050 gives error
frankcarey - November 5, 2008 - 22:04
| Project: | UC Discounts |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
when creating a new discount, I wanted to make the discount permanent, so I chose the highest year.
This gave the error along the lines " End date cannot be earlier than the Start date"... the start date was the same except the year (i put it all the way to 2050).
Since that date should be like 40 years in the future, there is a bug somewhere. Same error on 2049, but when i brought it back down to 2010, it worked. ( I didn't investigate further)
Using UC 6.2.x (from CVS today)

#1
The cause is that PHP can't deal with higher number that the server processor can support.
For 32 bit processor, the limit is about 2038, so, as we use mktime() to convert year into timestamp, you can't select a higher date than 2038 on 32 bit processor.
You can find more informations here : http://fr.php.net/mktime
I changed the returned message to notice about that limit, will be committed.
#2
committed for 6.x branch
#3
Automatically closed -- issue fixed for two weeks with no activity.