Perl is a feature-rich programming language that can easily handle dates and times within the program. Perl provides a predefined module called the DateTime module. This DateTime is a class that helps in representing various combinations of dates and times. The DateTime module in Perl renders the New Style of the calendar by extending backward in time before its creation (in 1582). This is usually called the “proleptic Gregorian calendar”. In such a calendar, the first day of the calendar (which is also called the epoch) is the first day of year 1 and is believed to be the birth of Jesus Christ.  The syntax is: use DateTime;  Program:  $datetime = localtime();
print "Local Time of the System : $datetime\
";