1

localtime() giving different values on different platform Linux

view story
linux-howto

http://stackoverflow.com – I want to know if localtime works differently on different platforms if timezone is set same in both. If it does,what are dependent parameters other than timezone? I run this in 2 platforms: #include <stdio.h> #include <time.h> #include <unistd.h> int main() { time_t t,t1;//,result; double d1; struct tm *tm; t1 = 1384496356; tm = localtime(&t1); printf("tm->tm_hour %d tm->tm_min %d\n",tm->tm_hour,tm->tm_min); return 0; } outputs tm->tm_mday 15 tm->tm_hour 11 tm->tm_min 33 and tm->tm_mday 15 tm->tm_hour 6 tm-& (HowTos)