improved convert_daytime performance