<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">I see that. I will add the switch to the my.cnf as the docs say that’s possible. or failing that, to the startup.</div><div class="">However, having set the database default structure to that stated below.</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">Name Type Collation Attributes Null Default</div><div class="">lastsent datetime Yes 1970-01-01 00.00.00</div><div class=""><br class=""></div><div class="">I would have thought it would be enough for it to now not to have 0000-00-00 00:00:00 in the table, but instead 1970-01-01 00.00.00</div><div class=""><br class=""></div><div class="">or I’m still missing something fundamental here.</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><span class="nowrap" style="text-decoration: none; cursor: pointer; outline: none; margin: 0px; padding: 0px; display: inline !important;">also, I’ve got an idea I’ve seen this reported as an issue sometime previously?</span></div><div class=""><br class=""></div><div class=""><span class="nowrap" style="text-decoration: none; cursor: pointer; outline: none; margin: 0px; padding: 0px; display: inline !important;">Robert<a href="https://quantum-radio.net/phpMyAdmin/sql.php?db=opendmarc&table=requests&token=89369c42e6ba2e052930f40cd14b23b8&goto=tbl_structure.php&back=tbl_structure.php&sql_query=SELECT+COUNT%28%2A%29+AS+%60Rows%60%2C+%60lastsent%60+FROM+%60requests%60+GROUP+BY+%60lastsent%60+ORDER+BY+%60lastsent%60&is_browse_distinct=1" style="color: rgb(35, 90, 129); font-family: sans-serif; font-size: 13px; white-space: nowrap; text-decoration: none; cursor: pointer; outline: none; margin: 0px; padding: 0px; display: inline !important;" class=""><img title="Distinct values" alt="Distinct values" class="ic_b_browse icon" style="vertical-align: middle; border: 0px; margin: 0px; padding: 0px !important; background-image: url(https://quantum-radio.net/phpMyAdmin/themes/pmahomme/img/sprites.png) !important; background-position: 0px -48px !important; background-repeat: no-repeat no-repeat !important;" apple-inline="yes" id="2B54D4EF-B443-4E8F-9571-4C40172347B3" height="1" width="1" apple-width="yes" apple-height="yes" src="cid:5F049F52-F932-4984-B5BE-D66EC5BCC6CE@Home"> </a></span></div><div class=""><ul class="resizable-menu table-structure-actions" style="margin: 0px; padding: 0px; list-style: none;"><li class="nowrap browse" style="white-space: nowrap; float: left; margin-right: 0.3em; color: rgb(68, 68, 68); font-family: sans-serif; font-size: 13px;"><a href="https://quantum-radio.net/phpMyAdmin/sql.php?db=opendmarc&table=requests&token=89369c42e6ba2e052930f40cd14b23b8&goto=tbl_structure.php&back=tbl_structure.php&sql_query=SELECT+COUNT%28%2A%29+AS+%60Rows%60%2C+%60lastsent%60+FROM+%60requests%60+GROUP+BY+%60lastsent%60+ORDER+BY+%60lastsent%60&is_browse_distinct=1" style="text-decoration: none; color: rgb(35, 90, 129); cursor: pointer; outline: none; display: block; margin: 0px; padding: 0px;" class=""><span class="nowrap" style="display: block; margin: 0px; padding: 0px;"><br class=""></span><span class="nowrap" style="display: block; margin: 0px; padding: 0px;"><br class=""></span><span class="nowrap" style="display: block; margin: 0px; padding: 0px;"><br class=""></span><span class="nowrap" style="display: block; margin: 0px; padding: 0px;"><br class=""></span></a></li></ul></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><br class=""><div><blockquote type="cite" class=""><div class="">On 24 Jun 2016, at 13:06, Juri Haberland <<a href="mailto:juri@sapienti-sat.org" class="">juri@sapienti-sat.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">On 2016-06-24 11:42, Robert@QuantumRadio wrote:<br class=""><blockquote type="cite" class="">hmm.<br class=""></blockquote><br class=""><blockquote type="cite" class="">So I have NO_ZERO_DATE set, but something in import/report/expire must<br class="">be setting the 0 date into the database in the first place I think.<br class=""></blockquote><br class="">The table is defined to have a default value of '0000-00-00 00:00:00' for the column 'lastsent'.<br class="">So whenever a new row is created that has no value for 'lastsent' the MySQL server uses '0000-00-00 00:00:00'.<br class=""><br class=""><blockquote type="cite" class="">I’ve set the database - datetime NULL DEFAULT '1970-01-01’<br class="">But it doesn’t seem to make a difference.<br class=""></blockquote><br class="">No, because the table is defined differently - see above.<br class=""><br class=""><blockquote type="cite" class="">So perhaps I should restart mysql without the NO_ZERO_DATE option set?<br class=""></blockquote><br class="">I'm in no way a MySQL expert, but from reading <a href="http://dev.mysql.com/doc/refman/5.7/en/sql-mode.html#sql-mode-changes" class="">http://dev.mysql.com/doc/refman/5.7/en/sql-mode.html#sql-mode-changes</a> it seems that having columns defined with DEFAULT '0000-00-00 00:00:00' was quite common and possible with MySQL < 5.7.<br class=""><br class="">So I would recommend to start your MySQL server without NO_ZERO_DATE and from reading the docs it will just work as it worked with older versions of MySQL.<br class=""><br class=""><blockquote type="cite" class="">but that will cause it to fail if the opendmarc-reporting system<br class="">tries to input a non-valid date<br class=""></blockquote><br class="">Why should it fail? '0000-00-00 00:00:00' is not an invalid date if the sql_mode does not include NO_ZERO_DATE.<br class=""><br class=""><blockquote type="cite" class=""> Or should I find where it’s being input in the code?<br class=""></blockquote><br class="">It's in the mysql-template file that was used to create the database for OpenDMARC.<br class="">Please open a bug and report this issue, so it can be dealt with in later releases.<br class=""><br class=""><br class="">Cheers,<br class=""> Juri<br class="">_______________________________________________<br class="">opendmarc-users mailing list<br class=""><a href="mailto:opendmarc-users@trusteddomain.org" class="">opendmarc-users@trusteddomain.org</a><br class="">http://www.trusteddomain.org/mailman/listinfo/opendmarc-users<br class=""></div></div></blockquote></div><br class=""></body></html>