My linux world » Perl – localtime

Perl - localtime


use strict;
use warnings;
 
my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
 
# example to get year in 4 digits:
$year += 1900;

Copyright © 2024 My linux world - by Marc RABAHI
Design by Marc RABAHI and encelades.