Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^2: Time::Piece reversibility

by mla12 (Acolyte)
on Jun 17, 2017 at 23:05 UTC ( [id://1193027]=note: print w/replies, xml ) Need Help??


in reply to Re: Time::Piece reversibility
in thread Time::Piece reversibility

I did try _04 too. I hadn't noticed the TZ difference, but it's still showing as 5pm rather than 10am:

strftime: Mon, 19 Jun 2017 17:07:42 PDT

And no, I forgot about the month being zero based for the test. Thx.

Replies are listed 'Best First'.
Re^3: Time::Piece reversibility
by hippo (Bishop) on Jun 17, 2017 at 23:26 UTC
    it's still showing as 5pm rather than 10am:

    Yes, that's definitely the problem. It seems that localtime is changing the epoch as well as setting the offset so you're always getting back to the same displayed hour when you apply both (and gmtime is of course doing neither). Good spot.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (2)
As of 2024-04-24 22:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found