Extract Epoch Time (Unix time) from a string hhmmss

206 views Asked by At

I need to obtain Epoch time from a string (received from GPS) to set my RTC. From GPS I have a string like:

*timeString= 122347,other stuff,other stuff. ., other stuff.... where 12=hh, 23=mm, 47=ss

I need to convert these time numbers to standard epoch time i.e.

epochTime =1583504713;

How can I do that? (I know that to obtain correctly Unix time I need month,year and day too; I have alrady all theese information saved in int variables). Thanks all ;)

Dave

0

There are 0 answers