Moved from GitHub dgraph/5778
Posted by EnricoMi:
What version of Dgraph are you using?
Have you tried reproducing the issue with the latest release?
What is the hardware spec (RAM, OS)?
Steps to reproduce the issue (command/config used to run Dgraph).
Start a fresh temporary dgraph instance with docker:
docker run -it --rm dgraph/standalone:v20.03.3 /bin/bash
Inside, run the following commands:
dgraph zero > /dev/null 2>&1 < /dev/null & dgraph alpha --lru_mb 1024 > /dev/null 2>&1 < /dev/null & echo "<a> <p> \"-0001-02-03\"^^<http://www.w3.org/2001/XMLSchema#date> ." > a.rdf
Wait a bit until dgraph alpha is up, then
dgraph live --files a.rdf
It fails on the date value with:
Error while processing data file "a.rdf": During parsing chunk in processLoadFile: while parsing line "<a> <p> \"-0001-02-03\"^^<http://www.w3.org/2001/XMLSchema#date> .\n": parsing time "-0001-02-03" as "2006-01-02T15:04:05": cannot parse "-0001-02-03" as "2006"
Negative years are defined by XMLSchema as BC: https://www.w3.org/TR/xmlschema-2/#dateTime.
Expected behaviour and actual result.
The example date should be parsed as
-0001-02-03, i.e. 3rd of February of year 1 BC.