fix local valid time for timestamps bug add test