PASTEBIN
| #1 paste tool since 2002
create new paste
tools
api
archive
real-time
faq
PASTEBIN
create new paste
trending pastes
sign up
login
my settings
my profile
Public Pastes
Untitled
7 sec ago
HGH - To Spin
3 sec ago
Untitled
4 sec ago
How to save text f...
5 sec ago
Mongoid Pagination...
11 sec ago
Windows XP Profess...
17 sec ago
Flush Socket block...
18 sec ago
Knight
18 sec ago
How do I determine the current timezone a machine is set to with Perl
By: a guest on Jan 28th, 2012 | syntax:
None
| size: 0.20 KB | hits: 11 | expires: Never
download
|
raw
|
embed
|
report abuse
Copied
use POSIX;
print strftime("%Z", localtime()), "n";
use POSIX;
localtime();
my ($std, $dst) = POSIX::tzname();
use DateTime::TimeZone;
print DateTime::TimeZone->new( name => 'local' )->name();
create a
new version
of this paste
RAW Paste Data
use POSIX; print strftime("%Z", localtime()), "n"; use POSIX; localtime(); my ($std, $dst) = POSIX::tzname(); use DateTime::TimeZone; print DateTime::TimeZone->new( name => 'local' )->name();