in reply to Help with date:manip

$date->config("setdate","now,EST"); But that returns an error too. What am I missing?

Probably  my $date = Date::Manip::Date->new;

update:
Try  Date_Init('SetDate=now,EST'); see https://metacpan.org/pod/Date::Manip::Config#TZ and https://metacpan.org/pod/distribution/Date-Manip/lib/Date/Manip/Changes5to6.pod#CONFIG-FILES-AND-VARIABLES

update: ++davido, full timezone name (or city name) is preferable to abbreviation

Replies are listed 'Best First'.
Re^2: Help with date:manip
by davido (Cardinal) on May 10, 2016 at 06:38 UTC

    Date::Manip has both a functions, and an OO interface.

    (Ah, but I see you're referring to his use of $date->config(...) later in the writeup. Yes... it seems a little like just trying things hoping something will work.)

    Anyway, the Date_Init function does work if I use US/Eastern instead of EST. Maybe that will help. :)


    Dave

      You are correct. Just trying things until they work cause I'm just a hack.

      This worked: Date_Init('SetDate=now,US/Eastern');

      Thanks so much!

Re^2: Help with date:manip
by htmanning (Friar) on May 10, 2016 at 06:43 UTC
    Thanks for the tip, but I'm still getting this: ERROR: config_var invalid zone in SetDate: Use of uninitialized value $mod in concatenation (.) or string at /usr/local/lib/perl5/5.22/Date/Manip/TZ.pm line 180. Use of uninitialized value $mod in concatenation (.) or string at /usr/local/lib/perl5/5.22/Date/Manip/TZ.pm line 181. Use of uninitialized value $mod in concatenation (.) or string at /usr/local/lib/perl5/5.22/Date/Manip/TZ.pm line 182.

      invalid zone in SetDate

      US/Eastern

      EST is an abbreviation, and as the error message states, isn't valid.


      Dave

      Thanks for the tip, but I'm still getting this: ERROR...

      :)

      Where is the code that generates that message? Are you trying to run Help with date:manip ? I get some errors with that code also :)

      update: ++ davido again, i had an older version (6.45) which didn't complain, Date::Manip 6.53 definitely complains about "EST" being invalid, no complaints about EST5EDT or America/New_York

        The warning was added in version 6.49, so that's why you didn't see it with the earlier version.