http://perldoc.perl.org/functions/time.html
time Perl functions A-Z <http://perldoc.perl.org/index-functions.html> | Perl functions by category <http://perldoc.perl.org/index-functions-by-cat.html>| The 'perlfunc' manpage <http://perldoc.perl.org/perlfunc.html> - *time* Returns the number of non-leap seconds since whatever time the system considers to be the epoch, suitable for feeding to gmtime<http://perldoc.perl.org/functions/gmtime.html>and localtime <http://perldoc.perl.org/functions/localtime.html>. On most systems the epoch is 00:00:00 UTC, January 1, 1970; a prominent exception being Mac OS Classic which uses 00:00:00, January 1, 1904 in the current local time zone for its epoch. For measuring time in better granularity than one second, you may use either the Time::HiRes <http://perldoc.perl.org/Time/HiRes.html> module (from CPAN, and starting from Perl 5.8 part of the standard distribution), or if you have gettimeofday(2), you may be able to use the syscall<http://perldoc.perl.org/functions/syscall.html>interface of Perl. See perlfaq8 <http://perldoc.perl.org/perlfaq8.html> for details. For date and time processing look at the many related modules on CPAN. For a comprehensive date and time representation look at the DateTime<http://search.cpan.org/perldoc/DateTime>module. ---------------------------------- [email protected] [email protected] 2009/9/15 Uliyas Fan <[email protected]> > 如果我想得到一个指定时间到1970-1-1日的秒数,应该有什么办法? 比分说想知道2003-5-7 13:50:06 到1970-1-1 > 00:00:00的秒数。 > 谢谢 > > > > --~--~---------~--~----~------------~-------~--~----~ 您收到此信息是由于您订阅了 Google 论坛“PerlChina Mongers 讨论组”论坛。 要在此论坛发帖,请发电子邮件到 [email protected] 要退订此论坛,请发邮件至 [email protected] 更多选项,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问该论坛 -~----------~----~----~----~------~----~------~--~---
