I have the following code that takes a unix time stamp into a date.

#include "stdafx.h"
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <conio.h>
//e.g. 1331812987 = Thu 15 Mar 2012 01:03:07 PM CET
int main(int argc, char** argv) {
 struct tm * dt;
 char b[19];
 long ts;
 ts = 1331812987;

 dt = localtime(&ts);
 // use any strftime format spec here
 strftime(b, sizeof(b), "%c", dt);
 fprintf(stdout, "%s", b);
 return 0;
Everything is right accept the HOUR of the timestamp which is 07 instead of 01

is this fixable?