Add testcase for timeperiod issue