Fix timestamps for period generation