This repository was archived by the owner on Nov 10, 2025. It is now read-only.
Commit d9c1758
committed
Use full precision timestamps in JSON responses
Currently we store timestamps with microsecond precision (the default
and maximum for PostgreSQL), but over the wire we only send milliseconds
(the default for Rails). This is fine for most purposes, but as we're
migrating data from forms-api to forms-admin at the moment it's helpful
to get the full precision so we can easily compare the contents of the
two databases without noise from truncated timestamps.
This commit uses the ActiveSupport configuration parameter to change the
`TimeWithZone#as_json` method to return all 6 digits of precision.1 parent 5e7e9a0 commit d9c1758
2 files changed
Lines changed: 5 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
45 | 48 | | |
46 | 49 | | |
47 | 50 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
73 | | - | |
74 | | - | |
| 73 | + | |
| 74 | + | |
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| |||
0 commit comments