Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^2: Time::Piece reversibility

by mla12 (Acolyte)
on Jun 18, 2017 at 18:22 UTC ( [id://1193059]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $ENV{'TZ'} = 'America/Los_Angeles';
    
    my $epoch = timelocal(42,07,10,19,05,2017);
    print "timelocal epoch: $epoch\n";
    print "timelocal date: ", scalar localtime($epoch), "\n";
    
  2. or download this
    timelocal epoch: 1497892062
    timelocal date: Mon Jun 19 10:07:42 2017
    
  3. or download this
    #!/usr/bin/env perl
    
    ...
          "T::P gmt strftime: ", $gmt->strftime, "\n",
          "T::P local strftime: ", $local->strftime, "\n"
    ;
    
  4. or download this
    gmt epoch: 1497866862
    local epoch: 1497866862
    datestr: 2017-06-19 10:07:42
    T::P gmt strftime: Mon, 19 Jun 2017 10:07:42 UTC
    T::P local strftime: Mon, 19 Jun 2017 03:07:42 PDT
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1193059]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (9)
As of 2024-03-28 09:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found