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

Re^6: GMT to PST format

by Anonymous Monk
on Jun 20, 2010 at 08:44 UTC ( #845608=note: print w/replies, xml ) Need Help??

in reply to Re^5: GMT to PST format
in thread GMT to PST format - - [15/Jun/2010:23:30:34 +0000] - - - [16/Jun/2010:23:30:34 +0000] -
The date and time is in GMT. I should convert to PST time.
#!/usr/bin/perl use Date::Manip; $date = ParseDate("2 days ago"); print $date
This works and why created a object doenst work.

Replies are listed 'Best First'.
Re^7: GMT to PST format
by Corion (Pope) on Jun 20, 2010 at 08:56 UTC

    Maybe you should read the documentation. If a class method ->new is not defined, it will not work.

    Most likely, you have a deeper misunderstanding about how objects work in Perl. ->new is a subroutine like any other subroutine, and not a keyword as it is in other languages. So if the module programmer does not provide you with a subroutine ->new, then you cannot call it and Perl tells you so.

Re^7: GMT to PST format
by Anonymous Monk on Jun 20, 2010 at 08:49 UTC
    #!/usr/bin/perl use Date::Manip; $date = Date_ConvTZ($date1,'GMT','PST'); print $date
    Is this command converts to PST format?

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://845608]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (2)
As of 2017-07-28 02:12 GMT
Find Nodes?
    Voting Booth?
    I came, I saw, I ...

    Results (424 votes). Check out past polls.