Jump to content

ridiculously wrong date on downloads....why?


Guest leviathan9821

Recommended Posts

Guest leviathan9821

Ok....so i have been using cubecart for like....years now.

I use it so my clients can download content in zip files.

When adding a product i click on the button that says "non-=tangible"

usually people download the file without issue but for the past few days the timer for download expire has been set to 1969

why is this and how can i change it.

it is starting to interfere with business as my purchases have dropped from regular clients.

Thank you in advance

Link to comment
Share on other sites

Ok....so i have been using cubecart for like....years now.

I use it so my clients can download content in zip files.

When adding a product i click on the button that says "non-=tangible"

usually people download the file without issue but for the past few days the timer for download expire has been set to 1969

why is this and how can i change it.

it is starting to interfere with business as my purchases have dropped from regular clients.

Thank you in advance

If you haven't changed any settings (under General Settings) in the admin panel... my guess is that your host changed the server time.

Link to comment
Share on other sites

The so-called "unix timestamp" (which Cubecart uses) sets the value of zero at midnight between Dec 31, 1969 and Jan 1, 1970. Working from this fact, let's say that for some reason, the unix timestamp is not getting calculated correctly or not getting saved correctly in the CubeCart_downloads!expire field. That field defaults to zero if CubeCart fails to save a value into it. Use whatever means you have available to look at the raw contents of that table.

If the server internal time was off, then the date, as seen in the upper right corner of the admin pages, would be off as well.

Double check the value in the General Settings page, Download Expiry Time. It should have an integer whose value is equal to the number of seconds the file is available. (172800 seconds is two days, if my sums are correct.)

If that's good, and there are large numbers in the expire field of the database table (like, 1189197234), then the next questions to ask are:

1. Did your host switch you over from PHP 4 to 5?

2. Did your host switch you over from MySQL 4 to 5?

3. Did you install/make any kind of modifications, even something that you believe could not affect this area of the store?

Link to comment
Share on other sites

Guest leviathan9821

The so-called "unix timestamp" (which Cubecart uses) sets the value of zero at midnight between Dec 31, 1969 and Jan 1, 1970. Working from this fact, let's say that for some reason, the unix timestamp is not getting calculated correctly or not getting saved correctly in the CubeCart_downloads!expire field. That field defaults to zero if CubeCart fails to save a value into it. Use whatever means you have available to look at the raw contents of that table.

If the server internal time was off, then the date, as seen in the upper right corner of the admin pages, would be off as well.

Double check the value in the General Settings page, Download Expiry Time. It should have an integer whose value is equal to the number of seconds the file is available. (172800 seconds is two days, if my sums are correct.)

If that's good, and there are large numbers in the expire field of the database table (like, 1189197234), then the next questions to ask are:

1. Did your host switch you over from PHP 4 to 5?

2. Did your host switch you over from MySQL 4 to 5?

3. Did you install/make any kind of modifications, even something that you believe could not affect this area of the store?

the only changes made to general is the download expiry time. it currently says:

17280000000005

if i reduce this to 172800 would that mean that the files would no longer say decmber 31st 1969?

would scrubbing the shopping cart and building a new one fix this?

i dont really want to do that since we have over 200 items that would then have to be re-added....but if thats the only way out i will....

I will also contact my server host to see if there is anything they can do...

thank you all for the help. will touch back later with update

Link to comment
Share on other sites

The download expiry time value is in seconds. So, 17280000000005 seconds is: five thousand centuries (and change). Ok, so I think you really want these items to be downloadable for the foreseeable future.

But when CC takes today's unix time and adds that value, I think the database field overflows.

Integer takes a max of 2147483647 (signed) or 4294967295 (unsigned).

Starting with 1219888687 as being somewhat close to today, you can only add about 30 years (946080000).

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...