time: move time stuff to time; basic support for rfc3339