Handle different time formats when getting data.