Take a look at Time::Local, which has timelocal() and timegm()
functions:
        http://cpan.uwinnipeg.ca/module/Time::Local

" These routines are the inverse of built-in perl functions localtime()
  and gmtime(). They accept a date as a six-element array, and return the
  corresponding time(2) value in seconds since the system epoch (Midnight,
  January 1, 1970 GMT on Unix, for example). This value can be positive or
  negative, though POSIX only requires support for positive values, so
  dates before the system's epoch may not work on all operating systems."

                                        Jan Jackson



On Wed, 28 Jul 2004, Ranga Nathan wrote:

> Is there a quick way to convert a time stamp (date & time)  as seconds
> since 1900-01-01 00:00:00?
> time() uses 1970 as base (epoch).
> But the system I am dealing with on mainframe uses 1900 as base.
>
> Looked at Date::Calc and Date::Manip but they  dont seem to handle this.
>
> Rather than hand-roll some calculations.....huh, I am lazy. That's why I
> Perl!
>
> Thanks for any help!
>
> __________________________________________
> Ranga Nathan / CSG
> Systems Programmer - Specialist; Technical Services;
> BAX Global Inc. Irvine-California
> Tel: 714-442-7591   Fax: 714-442-2840
> _______________________________________________
> Boston-pm mailing list
> [EMAIL PROTECTED]
> http://mail.pm.org/mailman/listinfo/boston-pm
>
_______________________________________________
Boston-pm mailing list
[EMAIL PROTECTED]
http://mail.pm.org/mailman/listinfo/boston-pm

Reply via email to