eheh nel mio caso si vedeva perchè c'era il while

cmq se ti interessa puoi usare anche gmtime così hai l'ora locale dell'UTC