Fixed tests to use localtime