Implements timecop to make tests independent from DateTime

close #327