Fix empty datetime sent to API

[Fixes #82434916]