Re: Translation from Unix raw time to normal time...

From: John Dilley (
Date: Mon Dec 27 1999 - 13:36:57 MST

Dear 8823559,

I thought Unix time format was the normal time format... What other format
could you mean? (See below :)

----- Original Message -----
From: 8823559 <>
To: <>
Cc: 8823559 <>
Sent: Monday, December 27, 1999 11:14 AM
Subject: Translation from Unix raw time to normal time...

> Hi:
> Is there any tool to convert Unix Raw Time to normal time
> format?...
> Thank you very much...:)

Just in case that wasn't the answer you were looking for here's a little
code that takes a Unix timestamp and prints out its ASCII representation in
your local timezone and in UTC (GMT). Best regards,


#include <time.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

print_time(time_t tval)
  char local[32], utc[32];

  strcpy(local, asctime(localtime(&tval)));
  strcpy(utc, asctime(gmtime(&tval)));
  printf("time_t %10d = %s UTC equivalent = %s", tval, local, utc);


main(int argc, char *argv[])
  int arg;

  if (argc == 1)
  else {
    for (arg=1; arg<argc; ++arg)

This archive was generated by hypermail 2b29 : Tue Jul 10 2001 - 12:00:10 MDT