Code to get time, flux and time_format from lightcurve object independent of v1 or v2 of the package.