[DOCS-2539] Document ISODate support in JSON parser Created: 15/Jan/14 Updated: 04/Mar/23 Resolved: 18/Sep/14 |
|
| Status: | Closed |
| Project: | Documentation |
| Component/s: | manual |
| Affects Version/s: | None |
| Fix Version/s: | v1.3.11, mongodb-2.6 |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Shaun Verch | Assignee: | Andrew Aldridge |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||
| Participants: | |||||||||||||||||||||
| Days since reply: | 9 years, 21 weeks, 6 days ago | ||||||||||||||||||||
| Description |
|
The JSON parser will support parsing ISODates as of Here's the specification (see time_support_test.cpp for the source of this information) UTC Dates. These are dates that the user is giving to us in UTC, and thus do not need time zone Allowed date format:
Year, month, day, hour, and minute are required, while the seconds component and one to three milliseconds are optional. Examples:
Only on systems where time_t is large enough:
UTC Dates. These are dates that the user is giving to us in local time, and thus do need time zone adjustment. The adjustment is specified by the offset at the end. Allowed date format:
Year, month, day, hour, and minute are required, while the seconds component and one to three milliseconds are optional. The time zone offset must be four digits.
Only on systems where time_t is large enough:
Local times (meaning we need to get whatever the current time zone is because it is not UTC or explicitly specified) are not currently allowed.
See time_support_test.cpp for the list of test cases specifying this behavior. Caveats: Note that 1970-01-01T00:00:00.000Z is the Unix timestamp of 0, since it represents the beginning of the epoch. We cannot currently represent dates before the Unix epoch, so any date before this is invalid. Note that this restriction has another manifestation. The date "1969-12-31T19:00:00-05:00", while technically representing the Unix timestamp of 0, cannot be parsed by the current implementation since the date is parsed before applying the offset. |
| Comments |
| Comment by Githook User [ 18/Sep/14 ] |
|
Author: {u'username': u'i80and', u'name': u'Andrew Aldridge', u'email': u'i80and@foxquill.com'}Message: Signed-off-by: Sam Kleinman <samk@10gen.com> |