Update travis configuration. Fix unit test which works with time function.