Date: Mon, 19 Nov 2001 16:00:33 -0500 (EST) From: Vivek Khera <khera@kcilink.com> To: freebsd-questions@freebsd.org Subject: Re: Epoch Time on Freebsd with perl Message-ID: <200111192100.fAJL0XX56384@onceler.kciLink.com> References: <NEBBJFKEHEOLHKCGOHFOCECMDMAA.simon.g@claycrossbs.co.uk> <87n11i34u7.fsf@ralf.artlogix.com>
next in thread | previous in thread | raw e-mail | index | archive | help
>>>>> "KM" == Ken McGlothlen <mcglk@artlogix.com> writes: KM> Someone whose name has been removed to protect the innocent writes: KM> | > [Chris Aitken writes] KM> | > $date1 = "2001-10-01 01:00:00"; KM> | > $date2 = "2001-10-01 03:00:00"; KM> | > KM> | > What I want is to somehow calculate that there is 2 hours between these 2 KM> | > dates (or 120 minutes, or 7200 seconds etc etc) [in Perl] KM> | > Any help on this would be appreciated. KM> | KM> | Depending on your database you could do this in SQL, I would recommend KM> | RTFMing its docs. KM> That deserves *some* kind of prize for possibly the least KM> efficient solution to a problem ever posted on the list. Why? The original poster was pulling the information *from* a database, so it seems most sensible to make the database compute the time difference during the fetch. It seems most efficient to me. -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Vivek Khera, Ph.D. Khera Communications, Inc. Internet: khera@kciLink.com Rockville, MD +1-240-453-8497 AIM: vivekkhera Y!: vivek_khera http://www.khera.org/~vivek/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200111192100.fAJL0XX56384>