Solar Inverter getting time

Not for that exact task, no. Start by running the TimeLib.h library example programs.

It is not very difficult to subtract two timestamps, which is the number of elapsed seconds.

From there, an imaginative person could calculate minutes, hours or days of elapsed time.