in reply to Time::Piece and Timzone?
Hello suba,
Your answer has been already answered but just to add another module in case that you are interested.
Sample bellow from Date::Manip:
#!/usr/bin/env perl use strict; use warnings; use Date::Manip; use feature 'say'; my $date_string = "Jun 03 19:49:27 2018"; say UnixDate($date_string, "Time: %T Month: %b Day: %e Year: %Y Timezo +ne: %Z"); say UnixDate("now", "Time: %T Month: %b Day: %e Year: %Y Timezone: %Z" +); __END__ $ perl test.pl Time: 19:49:27 Month: Jun Day: 3 Year: 2018 Timezone: CEST Time: 18:40:13 Month: Jun Day: 5 Year: 2018 Timezone: CEST
BR / Thanos
|
|---|