Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Strange behavior with Omr\Model_Temporal
  • Hi, i'm trying to use Model_Temporal for my "page" model. But i have a strange (and wrong) issue with "temporal_start" and "temporal_end"

    With "mysql_timestamp => false" in $_temporal array

    First record (at 10:34am) :
    image

    2nd Record :

    image

    We can see temporal timestamp are reset to 0, why ?

    -----------------

    With "mysql_timestamp => true"

    1st Record (at 10:37am) :

    image

    2nd Record

    image

    3rd Record :

    image

    Here we can see the behavior are strange and wrong. Why in the 1st record, the temporal_start = 08:37:33 ? etc..



    It's an issue, or a problem with my config ?
    image
  • HarroHarro
    Accepted Answer
    Quickly checked with Steve,  he replied:

    There is something wrong there. In that last set of images there is no max timestamp. I think this is related to another issue I found. Sometimes the orm config is not loaded and so the max timestamp value becomes null and causes odd behavour. The temp fix would be to try adding \Config::load('orm', true); to a bootstrap somewhere.

    If that does not fix it then it's a bug.
  • Thanks, it's work if i add the line after Fuel::init('config.php') in bootstrap.

    EDIT: And for my 1st set of images, it's because i've keep "timestamp" instead of "int" for temporals attributes in my table... -_-

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion