Time shift epochs

This is work in progress. Unit test fails at the moment, but must be some silly bug that I can't spot now.