Skip to content

Instantly share code, notes, and snippets.

@yudanta
Created June 23, 2015 04:20
Show Gist options
  • Save yudanta/00d143b524d619102981 to your computer and use it in GitHub Desktop.
Save yudanta/00d143b524d619102981 to your computer and use it in GitHub Desktop.
Simple time to epoch
#!/usr/bin/perl
#$second = waktu dalam detik
#$minute = waktu dalam menit
#$hour = waktu dalam jam (1-24)
#$day = hari
#$month = 0 => january 11 => december
#$year = tahun
use Time::Local 'timelocal';
$second = 0;
$minute = 10;
$hour = 10;
$day = 23;
$month = 5;
$year = 2015;
print timelocal($second, $minute, $hour, $day, $month, $year);
print "\n";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment