Help for this page

Select Code to Download


  1. or download this
    my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(t
    +ime);
    my $shour = ($hour > 11 ? $hour - 12 : $hour);
    $shour = 12 if ! $shour; # if 0 should be 12
    
  2. or download this
    my $hour = int (time / 3600) % 12;
    $hour = 12 if ! $hour; # if 0 should be 12