Q: Difference in Time Using mktime function in linux Let us say I have 2 different input times. Time-1  is 2013-10-01-00-00-00 and Time-2 is 2000-01-01-12-00-00.
I have populated the above two times into struct tm structures. I have used mktime and passed the 2 structures and got two different values of type time_t. Let us they are Time_1 and Time_2 respectively. 
Now if I take the difference of Time_1 and Time_2 , 


*

*Does it include the elapsed seconds between the 2 input times Time-1
and Time-2 ?

*Does the function internally take care of extra second for leap
years ?

*To Get The Actual Difference in terms of UTC , do I need to
add/subtract leap years ?


A: A leap year is a year with an extra day in it. All of the Posix time functions handle these perfectly.
There are also "leap seconds" which are inserted into or deleted from UTC from time to time by the International Earth Rotation and Reference Systems Service. None of the Posix time functions are aware of leap-seconds.
So if you care about leap seconds, you need to account for them yourself. If you're only interested in what are commonly called leap years, no worries.
