And if I don’t set them, the value shown for 0000-00-00 00:00:00 will be 1970-01-01 00:00:00.
This is specially tricky because on the database it is added 1970-01-01 00:00:00 and filtering all this it is a bit of an headache.
I’m wondering if using unix time format would solve this problem or if you were able to sort this out with other ways? I am on the critical phase of defining now these settings. Later will be too late
Should be 0000-00-00 00:00:00.
One of the thinks I thought it could work was to have this field in the database as varchar instead of date. The empty value would be stored as empty or as 0000-00-00 00:00:00 but I know it is not the best solution.
Note that MySQL Strict mode doesn’t support the zero value for a datetime field.
It’s also worth checking what your current model does. Does it actually write 1970-01-01 00:00:00 to the database, or is a literal NULL value stored and that is only rendered as such? In the latter case, it may be something you can tweak in the rendering, but I don’t know much about MIGX.
I do personally tend to use unix timestamps because they’re less… magical.
I recognized that date, its apparently a default value (that converts to 0, it seems).
Ok I just googled, here is a thread about MIGX, with a workaround by the OP
Here also is more info, the case is different but this is where someone says that date converts to zero, and some of the workaround might be useful for you
I think, if you need dates, you will want to save them as part of your processing. I think this date is appearing because there is not a date saved for that item, but I could be wrong about that.
Searching Modx “1970-01-01” also has more hits
Edit: This looks like a solution from BobRay on the first page, to fix the date of tv creation for every tv.