Function for conversion of GMT to Unix epoch
by linxbee from LinuxQuestions.org on (#59NJC)
Hi,
Is there any standard portable function to convert time given in below format to epoch since 1900
Code: Oct 8 15:04:56 2020 GMTcurrently i am using below command
Code: date -d "Oct 8 15:04:56 2020 GMT" +%sto convert to epoch
I have looked at the Code: time.h about the various time functions available there but none seems to satisfy my requirement.
Asking here hoping that some one might have done it already.
Thanks,


Is there any standard portable function to convert time given in below format to epoch since 1900
Code: Oct 8 15:04:56 2020 GMTcurrently i am using below command
Code: date -d "Oct 8 15:04:56 2020 GMT" +%sto convert to epoch
I have looked at the Code: time.h about the various time functions available there but none seems to satisfy my requirement.
Asking here hoping that some one might have done it already.
Thanks,