I've a problem with time functions in C. I get current time and convert it to local time and gmt time. But their value seems to be same.I think I'm missing something..
gmtime() converts epoch seconds to a struct tm that represents GMT time/date
ctime() implicitly calls localtime - it made a struct tm three hours "faster" than gmtime because of your timezone setting.
-- using the same epoch time.
Your timezone setting is 3 hours East of the zero meridian. How you set the timezone affects the output of ctime. gmtime is not affected by timezone settings.
What OS are you on? that affects how you show and set current TZ settings.