Hmm, I always just use Date::Manip -- it is pure Perl, and so runs on
all platforms, and can handle conversions from/to virtually any date
string format you throw at it...
Cheers,
David Hansen
UBS Warburg Switzerland
______________________________ Reply Separator _________________________________
Subject: RE: dealing with VMS format dates
Author: Neil.Ransom ([EMAIL PROTECTED]) at unix,mime
Date: 03/30/01 2:15 AM
I believe the answer may lie within VMS::Misc.
> -----Original Message-----
> From: Forrest Cahoon [mailto:[EMAIL PROTECTED]]
> Sent: 30 March 2001 06:03
> To: [EMAIL PROTECTED]
> Subject: dealing with VMS format dates
>
>
> 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... |
>
-----------------------------------------------------------------
Visit our Internet site at http://www.reuters.com
Any views expressed in this message are those of the individual
sender, except where the sender specifically states them to be
the views of Reuters Ltd.
Visit our website at http://www.ubswarburg.com
This message contains confidential information and is intended only
for the individual named. If you are not the named addressee you
should not disseminate, distribute or copy this e-mail. Please
notify the sender immediately by e-mail if you have received this
e-mail by mistake and delete this e-mail from your system.
E-mail transmission cannot be guaranteed to be secure or error-free
as information could be intercepted, corrupted, lost, destroyed,
arrive late or incomplete, or contain viruses. The sender therefore
does not accept liability for any errors or omissions in the contents
of this message which arise as a result of e-mail transmission. If
verification is required please request a hard-copy version. This
message is provided for informational purposes and should not be
construed as a solicitation or offer to buy or sell any securities or
related financial instruments.