date/time calculations

date/time calculations

Post by Resident.Ali » Sat, 11 Jul 1992 04:55:09

I'm faced with the task of getting dates from a database (I get 'em as strings)
and doing calculations on them (difference in days from one to another and so

I have easy means to whomp the string versions into 'struct tm's and from
there, of course, I can scrunch 'em into time_t's for somewhat easy subs and
adds.  I'm wondering if there is a common package of functions to do date calcs
working with struct tm's? (time_t's are limited in what they can represent and
are by nature non-portable, I'd guess).

DRD Corp., 5506 South Lewis Ave., Tulsa, OK 74105         (918)745-9037 fax


1. Help with date/time calculations in shell script

I'm trying to write a script that will compute the time difference (in
minutes) between a file's timestamp and the current system time. I
obviously run into difficulty dealing with day and month changes. How
have others solved this problem? I have heard of something called "epoch
time" (the seconds since 1/1/70) but don't know how to calculate it.

Can anyone help me with this?

Thanks very much.
Christopher Sink                            Office:(609) 243-0846

I/S Operations

2. NFS through gateway

3. Looking for program to do DATE/TIME calculations

4. FTP in Midnight Commander

5. Time difference between dates calculation

6. Running a background process using &

7. Date and time difference calculation

8. AIX 3.2.5 Installation Guide

9. date/time of a file compare with current date/time

10. run time date and syslog date/time conflict

11. Date Calculations

12. Backwards date calculation

13. date calculation for log files ?