Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^5: GMT to PST format

by Corion (Pope)
on Jun 20, 2010 at 08:38 UTC ( #845607=note: print w/replies, xml ) Need Help??


in reply to Re^4: GMT to PST format
in thread GMT to PST format

my $date_manip_object = new Date::Manip;

Where in the documentation did you find that usage? It doesn't work because the module does not work that way. Read Date::Manip.

Replies are listed 'Best First'.
Re^6: GMT to PST format
by Anonymous Monk on Jun 20, 2010 at 08:44 UTC
    10.1.10.178 - - [15/Jun/2010:23:30:34 +0000] - 10.1.10.178 - - [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.

      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.

      #!/usr/bin/perl use Date::Manip; $date = Date_ConvTZ($date1,'GMT','PST'); print $date
      Is this command converts to PST format?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://845607]
help
Chatterbox?
[Corion]: If all else fails, Spreadsheet::XLSX should be "installable" by manually copying the files, provided that the prerequisites are met
[thezip]: It fails in the "formatted 2-digit numeric" tests
[thezip]: Okay Corion, that's what I wanted to hear. Thanks!
[Corion]: Oh, a test failure... Just force-install it then? --force and potentially --notest to skip the tests alltogether ?
[ambrus]: thezip: is Activestate Perl usable for your scenario instead?
[MidLifeXis]: Yeah, --notest is good, not sure I would do --force.
[thezip]: It fails 2/10 tests in that group. What are the ramifications if I force it? What should I look for for?
[thezip]: I've migrated from ActiveState to Strawberry. No going back...
[thezip]: I'll try the --notest arg first when I get back from meetings (after lunch).
[thezip]: Thanks guys for your comments! :-)

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (13)
As of 2017-03-23 17:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (290 votes). Check out past polls.