Timestamp support

This is a initial draft of the new timestamp support.