Hello, everyone.

I have what _should_ be a very simple task for VMS perl, but I'm not
sure how to go about it.

What I need to do is take a time written as a VMS-standard format
string (e.g. 29-MAR-2001 22:42:18.31) and compare it with a file
creation date, to see whether the file was created within, say, the 10
seconds prior to the date represented.

I know I can get the file creation date with stat, but handling the
VMS format date string elegantly is another question.

I'm thinking that the right way to do this is to write some kind of XS
hooks into the VMS system library date functions (e.g. SYS$ASCTIM) but
then you get Smithsonian time, not epoch seconds.  There must be an
easy way to convert between the two.

I'd be happy to write a VMS::Date module to deal with this, but my
mind is still stumbling on what the internal representation inside a
VMS::Date object should be.  Smithsonian time?  That preserves
accuracy, but can a quadword be stored in a perl scalar?  And what
about the time zone information?  VMS times are local, epoch seconds
are UTC ...

If someone can suggest to me a good structure, I'm sure I can probably
hack out the required system service calls with little difficulty.

Suggestions?

| Forrest Cahoon      | [EMAIL PROTECTED] |------------------------------|
| 850 21st Ave SE     |----------------------| Only unbalanced people       |
| Mpls MN  55414-2514 |                      |        can tip the scales... |

Reply via email to