ukhas/habitat — Issue #162: proposed breaking change: use ISO8601 timestamps in Couch
Author: adamgreig
Created: 2012-02-15 01:26:31+00:00
State: open
Labels: couchdb, validation

Currently we use UNIX timestamp integers in our Couch documents. This is a basically crap format that is a pain to read or change and serves absolutely no benefit for us. I don't think it was really considered at the time...

I propose we use ISO8601 timestamps, which incidentally are the same recommended by JSON Schema for JSON documents (and almost everything else for almost everything else), and look like:

YYYY-MM-DDThh:mm:ssZ

They're easier to change, happily stored as strings, readily typed in by hand if required, can store timezone information if required, are easily validated using JSON schema, valid for untold millennia, and also

![](http://i.chzbgr.com/completestore/2012/2/14/607a288f-515e-4fee-acdd-0890ec068972.jpg)