Backward compatible way to get time.