[svlug] Time - yy mm dd hh mm ss

Ray Olszewski ray at comarre.com
Thu May 25 21:47:07 PDT 2000

You don't say what context this routine needs to work in. In Perl, the
Time::local module has functions timelocal() and timegm() that do about what
you want (they want the time components in the opposite order from what you
show, but I assume you can cope with that).

I'm sure it will handle Y2K and leap years fine. I have my doubts about leap
seconds. I don't think *any* standard code can handle leap seconds, as they
don't get added to standard time by any set formula that can be programmed. 

At 09:20 PM 5/25/00 -0700, Edward M. Goldberg wrote:

>I needs a routine that converts time in "time = yyyy mm dd hh mm ss" format
>to UNIX standard time so that I can test for (timeA - TimeB) >  6Hr with no
>Y2K problems.
>The old code that I have does not perform any corrections for Y2K leap seconds
>or Leap years ...

------------------------------------"Never tell me the odds!"---
Ray Olszewski                                        -- Han Solo
Palo Alto, CA           	 	         ray at comarre.com        

More information about the svlug mailing list