Conversion of Time Format
Dave Davey
daved at physiol.su.oz
Sat Mar 3 18:51:47 AEST 1990
dyu at paul.rutgers.edu (Delong Yu) writes:
>As you know, unix usee a long int to represent time(seconds from Jan
>1, 1970) and there are some functions to convert this format to
>English-like format. But how to do the reverse conversion, anyone
I have added some code to a program called fdate that went out on
the net years ago. The original program allowed you to print the
current date in almost any format. I support a "-i date_string"
input option as well as a "-r days_relative_to_today".
This allows for answering questions in shellscripts like "what
day of the month will it be in two days time" etc. I think my
-i option will accept any unequivocal format I have ever seen or
dreamt up.
I'd be happy to distribute this code if I had the permission of the
original author of fdate. Unfortunately I've lost track of who that
was.
More information about the Comp.unix.questions
mailing list