Highlights
All Snippets
Top 100 Snippets
Librarians
gbCodeLib

By Language
VB6
JavaScript
Perl
HTML
SQL
Java
DOS

GBIC >> Source Code >> Perl >> Snippet

print current time


( $sec , $min , $hour , $mday , $mon , $year_off , $wday , $yday , $isdat ) = localtime
print $sec , " seconds (0-59) \n " ;
print $min , " minutes (0-59) \n " ;
print $hour , " hour (0-23) \n " ;
print $mday , " day of the month (1-31) \n " ;
print $mon , " month of the year (1-12) \n " ;
print $year_off , " number of years since 1900 \n " ;
print $wday , " day of the week (0-6) \n " ;
print $yday , " day of the year (0-365) \n " ;
print $isdat , " True if Daylight Savings Time is in effect \n " ;