diff options
-rwxr-xr-x | unixtime.pl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/unixtime.pl b/unixtime.pl index f47cf9f..ca99311 100755 --- a/unixtime.pl +++ b/unixtime.pl @@ -2,7 +2,7 @@ use POSIX qw( strftime ); use Time::HiRes qw( gettimeofday ); -if (defined $ARGV[0]) { +if (defined $ARGV[0] and $ARGV ne "") { if ($ARGV[1] eq "ms") { #Convert from timestamp in milliseconds to date $seconds = substr $ARGV[0], 0, 10; |