int main()
{
while (true)
{
time_t t_tempostato;
struct tm *tempostato;
tempostato = (struct tm*)malloc(sizeof(struct tm));
const char * tempoc= "2013-10-03 11:33:52";
strptime(tempoc, "%Y-%m-%d %T", tempostato);
t_tempostato = mktime(tempostato);
cout << "Tempo in stato centrale: " <<t_tempostato << endl;
char buffer [80];
strftime (buffer,80,"Tempo in stato centrale: %D %T\n",tempostato);
puts(buffer);
sleep(1);
}
}