Due to the length of the timestamps 32 bit PHP is incapable of handling them as integers and you get very unexpected results.

When using PHP on Windows, even if you are using 64 bit hardware and the 64 bit version of PHP it still uses 32 bit integers.

I think the main place I encountered this being an issue is with the entity api integration, which uses integers, so for example, indexing the timestamp in solr via search API gets broken 32 bit handled integers.

Possible solutions:

  • Change to handle them as strings. There wouldn't be much downside to this off the top of my head.
  • Ignore and document the issue. On Windows you can seemingly get around it by using PHP 7.x 64 bit, although the 64 bit integer support is supposedly experimental it works in my limited testing. PHP 5.x on Windows is completely out. 32 bit PHP on other systems is also out.
  • Maybe others?

Comments

rooby created an issue. See original summary.

rooby’s picture

Issue summary: View changes
rooby’s picture

Documentation should suffice for this.

Maybe an item in the 'Requirements' section that says requires 64 bit integers, like the Multiversion module does.

rooby’s picture

Title: Timestamp doesn't work properly on 32 bit PHP / windows 5.x PHP » Timestamp requires 64 bit integers
Component: Code » Documentation
Category: Bug report » Task