Awesome
I had found documentation on the +1900 but nothing on +1 for month....
I had fixed it using
print strftime "%Y-%m-%d-%H.%M.%S\n", gmtime($test);
Thank you so much!
Hi, I'm trying to display the current time and date...
If I do this:
#!/usr/bin/perl
use POSIX;
print "Time is: ";
$test = time();
print "$test\n";
($sec,$min,$hour,$mday,$month,$year) = gmtime($test);
print "$year-$month-$mday-$hour:$min:$sec\n";
print strftime "%Y-%m-%d-%H.%M.%S\n"...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.