How to convert Unix Epoch time to PST in Windows C++? - Stack Overflow
You actually should get the timezone of your computer and do the calculations (ie: the -8) based on that. mktime sets the tzname too, so what does the modified: printf("\n%s\nAFTER CONVERSION = %04d %02d %02d %02d %02d\n", *tzname,ptm->tm ......