{

How to get Local and UTC date and time in Perl with code example


 Perl Get Current Date and time in local and utc check empty or blank Perl with code example

This tutorial explains about how to get Current Date and time in Local and UTC

How to get Current Date and time in UTC format in Perl

  • using DateTime
use strict;
use warnings;
use DateTime;    
my $dt   = DateTime->now;  
print "$dt"

How to get Current Date and time in Local System time in Perl

This is an example of getting date and time of a Local System.

use strict;
use warnings;
use DateTime;    
my $dt   = Localtime();  
print "$dt"
THE BEST NEWSLETTER ANYWHERE
Join 6,000 subscribers and get a daily digest of full stack tutorials delivered to your inbox directly.No spam ever. Unsubscribe any time.

Similar Posts
Subscribe
You'll get a notification every time a post gets published here.