- tm = gmtime (&Time);
- (void)printf("%02d/%02d/%04d %02d:%02d:%02d.%06u ",
- tm->tm_mon+1, tm->tm_mday,
- tm->tm_year+1900,
- s / 3600, (s % 3600) / 60,
- s % 60, (unsigned)tvp->tv_usec);
+ tm = gmtime (&Time);
+ if (!tm)
+ printf("Date fail ");
+ else
+ printf("%04d-%02d-%02d ",
+ tm->tm_year+1900, tm->tm_mon+1, tm->tm_mday);
+ printf("%02d:%02d:%02d.%06u ",
+ s / 3600, (s % 3600) / 60, s % 60, (unsigned)tvp->tv_usec);