Datetime type storing empty string for “0001-01-01T00:00:00Z”

As already pointed out in this topic, dgraph stores 0 times as empty strings and return them as empty string at query time.
This makes it impossible to unmarshal the response (Golang) if a 0 date is present, even using pointers.
Dgraph should either drop completely the empty date from the response or return the date in a valid format otherwise it’s just impossible to use the query answer

The bug is present at the time of writing in version 20.07.2

I have marked this issue as accepted and we’ll get this behavior fixed for you.