New Issue Checklist
Issue Description
Parse server replaces null value with a Date set at 1970-01-01 when sending back the data for a query.
Steps to reproduce
In any collection with a Date field, set the value to null (either directly in the MongoDB or through the parse sdk, e.g. object.set('date', null))
Actual Outcome
I get a Date instead of null, set to 1970-01-01. (just like new Date(null)).
Expected Outcome
I expect the value to be null.
Environment
Server
- Parse Server version:
4.10.3
- Operating system:
Docker image node:14-alpine
- Local or remote host (AWS, Azure, Google Cloud, Heroku, Digital Ocean, etc):
AWS
Database
- System (MongoDB or Postgres):
MongoDB
- Database version:
4.4.8
- Local or remote host (MongoDB Atlas, mLab, AWS, Azure, Google Cloud, etc):
MongoDB Atlas
Client
- SDK (iOS, Android, JavaScript, PHP, Unity, etc):
iOS, Android, JavaScript, cURL
- SDK version: not relevant. The network panel in Chrome shows the json sent by parse server already has the issue.
Logs
New Issue Checklist
Issue Description
Parse server replaces null value with a Date set at 1970-01-01 when sending back the data for a query.
Steps to reproduce
In any collection with a Date field, set the value to null (either directly in the MongoDB or through the parse sdk, e.g.
object.set('date', null))Actual Outcome
I get a Date instead of null, set to 1970-01-01. (just like
new Date(null)).Expected Outcome
I expect the value to be null.
Environment
Server
4.10.3Docker image node:14-alpineAWSDatabase
MongoDB4.4.8MongoDB AtlasClient
iOS, Android, JavaScript, cURLLogs