Either use strtull()
or lop off the milliseconds yourself.
unsigned long long tms = strtoull("1382507187943", 10, 0);
time_t rawtime = tms/1000;
unsigned ms = tms%1000;
or
char buf[] = "1382507187943";
unsigned ms = strtoul(&buf[10], 10, 0);
buf[10] = '\0';
time_t rawtime = strtoul(buf, 10, 0);
then
struct tm * timeinfo;
time (&rawtime);
timeinfo = localtime (&rawtime);