#!/usr/bin/perl # use strict; use warnings; use POSIX qw(strftime); my $timeZone = strftime "%z", localtime(); print "$timeZone \n"; Output: # perl t3.pl +0100 #### Usage: POSIX::strftime(fmt, sec, min, hour, mday, mon, year, wday = -1, yday = -1, isdst = -1) at test.pl line 2537 (#1) (F) You called a POSIX function with incorrect arguments. See POSIX/FUNCTIONS for more information. Uncaught exception from user code: Usage: POSIX::strftime(fmt, sec, min, hour, mday, mon, year, wday = -1, yday = -1, isdst = -1) at test.pl line xxxx.