Fix EZP-23019 : store null timestamp when date(time) is unset

Not tested yet but here is my bold take at fixing the regression I introduced in #947

Please tell me what you think of this approach or if I'm missing anything while I test it locally.