[comp.os.vms] Printing file age from DCL

graham@DRCVAX.ARPA (02/12/88)

Many have asked this question before.  As far as I know, there isn't an 
easy, or difficult way to add or subtract times and dates from DCL.

The VAX stores dates and times in a quadword format.  Basically, the 
quadword is the number of 100 millisecond chunks since midnight, 17 
November 1858.  (Don't ask!)

It would be simplicity itself to write a brief FORTRAN program to subtract 
dates so you could have file age.  You need the use of three system 
services/RTL routines:

1. SYS$BINTIM to translate the date strings into quadword format
2. LIB$SUBX to subtract the two quadwords
3. SYS$ASCTIM to convert the resulting quadword into a string

Remember that delta times use negative values.


hope this helps a little,

Dan Graham
------

dave@wsccs.UUCP (Dave E Martin "VAX Headroom") (03/02/88)

In article <8802152352.AA08946@ucbvax.Berkeley.EDU>, graham@DRCVAX.ARPA writes:
> quadword is the number of 100 millisecond chunks since midnight, 17 
> November 1858.  (Don't ask!)

This was the time when the current calendar was accepted for use.

+-----------------------------------------------------------------------------+ 
|		    |	     Dave E Martin       | DISCLAIMER: Been Cancelled |
|    /\		    | "...between the streets of | $ opinion/mine/noUinTech   |
|   /  \  .    /\   | Dallas, and the beaches of |----------------------------|
|  /    \/ \/\/  \  | Miami ...  THIS  was   Max | ...!ihnp4!utah-cs!utah-gr! |
| / U i n T e c h \ | Headroom's  finest  hour." | uplherc!sp7040!obie!       |
|		    |	          --Max Headroom | wsccs!net23.dnet!dave      |
+-----------------------------------------------------------------------------+

tsf@arizona.edu (Ted Frohling @ CCIT-Telcommunications, University of Arizona) (03/08/88)

In article <231@wsccs.UUCP>, dave@wsccs.UUCP (Dave E Martin  "VAX Headroom") 
writes:
> This was the time when the current calendar was accepted for use.

What?  That date just happens to be the Julian day 2000000 (have I got the 
right number of zeros?).  It does not have anything with acceptance of any
calendar by anyone.  Just a convenient demarcation point.
-- 
Ted Frohling                               Internet: tsf@rvax.ccit.arizona.edu
Network Support                            BITNET:   tsf@arizrvax.BITNET 
CCIT - Telecommunications                  AT&T:     (602) 621-4834
University of Arizona, Tucson, AZ 85721

dave@wsccs.UUCP (Dave E Martin "VAX Headroom") (03/15/88)

In article <4174@megaron.arizona.edu>, tsf@arizona.edu (Ted Frohling @ CCIT-Telcommunications, University of Arizona) writes:
> In article <231@wsccs.UUCP>, dave@wsccs.UUCP (Dave E Martin  "VAX Headroom") 
> writes:
> > This was the time when the current calendar was accepted for use.
> 
> What?  That date just happens to be the Julian day 2000000 (have I got the 
> right number of zeros?).  It does not have anything with acceptance of any
> calendar by anyone.  Just a convenient demarcation point.

I remember reading somewhere that it was the calendar.
However, in looking in _VAX/VMS Internals and Data Structures_ (ver 3 edition)
ch 11.1.2 page 215:

"The system time is defined by a quadword value measuring the number of
100-nanosecond intervals since 00:00 hours, November 17, 1858 (the time
base for the Smithsonian Institution astronomical calendar)."

Which, of course, is probably based on the above mentioned julian day.

+-----------------------------------------------------------------------------+ 
|		    |	     Dave E Martin       | DISCLAIMER: Been Cancelled |
|    /\		    | "...between the streets of | $ opinion/mine/noUinTech   |
|   /  \  .    /\   | Dallas, and the beaches of |----------------------------|
|  /    \/ \/\/  \  | Miami ...  THIS  was   Max | ...!ihnp4!utah-cs!utah-gr! |
| / U i n T e c h \ | Headroom's  finest  hour." | uplherc!sp7040!obie!       |
|		    |	          --Max Headroom | wsccs!net23.dnet!dave      |
+-----------------------------------------------------------------------------+