Epoch Date to Regular Date – Epoch Zamanını Normal Zamana çeviren Perl Script
Hi,
This code converts epoch date to regular date. Epoch date means seconds from 1970 1st Jan 00:00:00.0.
Merhaba,
Bu kod Epoch Zamanını Normal Zamana çevirir. Perl’de yazılmıştır. Epoch zamanı 1 Ocak 1970 00:00:00.0 zamanından itibaren verilen tarihe kadar saniyelerin sayımından elde edilir.
Ayrıntılı bilgi için bana yazabilirsiniz.
Çalıştırmak için “perl epochtodate.perl”
*************************
CODE
*************************
#!/usr/bin/perl
my $time = 1334351400; # or any other epoch timestamp
my @months = (“Jan”,”Feb”,”Mar”,”Apr”,”May”,”Jun”,”Jul”,”Aug”,”Sep”,”Oct”,”Nov”,”Dec”);
#my @months = (“Ocak”,”Subat”,”Mart”,”Nisan”,”Mayis”,”Haziran”,”Temmuz”,”Agustos”,”Eylul”,”Ekim”,”Kasim”,”Aralik”);
my ($sec, $min, $hour, $day,$month,$year) = (localtime($time))[0,1,2,3,4,5];
# You can use ‘gmtime’ for GMT/UTC dates instead of ‘localtime’
print “Unix time “.$time.” converts to “.$months[$month].” “.$day.”, “.($year+1900);
print ” “.$hour.”:”.$min.”:”.$sec.”\n”;
*************************
- Regular Date to Epoch Date – Normal Zamanı Epoch zamanına çeviren C Shell
- AÖF İlahiyat Geçmiş Sınav Soruları – Sosyal Bilimlerde Temel Kavramlar