Re: Event.pm 'after' attribute
[email protected] ((Randal L. Schwartz)) 03 Apr 2004 03:10:33 -0800
| Newsgroups | perl.loop |
|---|---|
| Organization | Stonehenge Consulting Services; Portland, Oregon, USA |
| Message-ID | <[email protected]> |
>>>>> "Jerry" == Jerry D Hedden <[email protected]> writes: Jerry> It might be useful to know the time at the start of today. You Jerry> can find it with: Jerry> use Time::Local; Jerry> my $TodaySeconds = int timelocal(0,0,0,(localtime)[3,4,5]); Jerry> However, it's quicker and easier to do the same thing as follows: Jerry> my $TodaySeconds = time(); Jerry> $TodaySeconds -= $TodaySeconds % 86400; No. You forget, daylight savings time. You'll be an hour off all summer. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 <[email protected]> <URL:http://www.stonehenge.com/merlyn/> Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!