Jump to content

Product Updated Time Showing 0000-00-00 00:00:00


bsmither

Recommended Posts

In the database table CC_inventory, the 'updated' column holds a Date/Time data type. Under certain circumstances, this column holds 0000-00-00 00:00:00. (I don't know how it got that way.)

 

Queried by products.index.inc.php near line 1216, where later $updated_time is set to the column value, then used as a looks-like boolean.

 

Since the string contains characters other than zero/decimal, this results in a true result and the Product Inventory list displays that string. The expected display is a phrase that says: Unknown.

 

Suggest: ...  = ($updated_time !== "0000-00-00 00:00:00") ? ...

 

(Just mentioning it here until there is a publicly accessible bug tracker put online.)

Link to comment
Share on other sites

This issue may have occurred from an upgrade from v3 or v4. The field didn't exist prior to v5 so it's default value is zero. This may be a different bug to what is being reported here, but it's an issue I have come across before.

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...