Instance Reader to Support Micro/Nanoseconds

Description

Any timestamps with a greater than millisecond precision cannot be handled by the ClouseScript reader:

Here "2012-12-30T23:20:05.066980000-00:00" is an example of an ordinary timestamp that is returned from Postgres.

ClojureScript reader interprets the nanosecond portion "066980000" as milliseconds and the check here fails:

Environment

N/A

Activity

Show:
Jonas Enlund
July 31, 2013, 12:18 PM

format take care of the padding

so those tests won't generate strings of the form "2010-1-1T1:14:15.666-06:00".

Also, the clojure reader can't read such literals and requires zero-padding:

The clojurescript reader returns bogus dates:

which is probably the reason the tests from https://github.com/clojure/clojurescript/blob/master/test/cljs/cljs/reader_test.cljs#L57 still passes without assertion errors.

Jonas Enlund
July 31, 2013, 11:58 AM

I can't find the tests you're referring to. Link?

David Nolen
July 31, 2013, 10:59 AM

I note that Clojure includes these tests so probably not a good idea to remove them. Also they actually test different things right? I'd rather see the tests fixed if they need to be adjusted for the new behavior.

Completed
Your pinned fields
Click on the next to a field label to start pinning.

Assignee

Unassigned

Reporter

import

Labels