logo       

Re: Help Adding event with Perl: msg#00179

Subject: Re: Help Adding event with Perl
On 8/31/06, Gk <kai@xxxxxxxxxxxxxx> wrote:
>
> Woodrow,
>
> Thanks for your help! Got Net::Google::Calendar installed and added
> my first event via PERL......well, almost.
>
> I can't seem to get the time right. Any chance someone can see
> what I'm doing wrong in the following:
>
> I have the code below (and a similar $end_time):
>     $start_time = DateTime->new(
>          time_zone => 'America/New_York',

[snip]

> But when I go look at the event on my
> calendar, the time is 4 hours earlier (8:30am,
> not 12:30 as I would hope). I'm baffled?!

My guess?  You need to take another look at the DateTime module -- I
think the time_zone functionality is off on Win32-based systems:

http://search.cpan.org/~drolsky/DateTime-TimeZone-0.48/lib/DateTime/TimeZone.pm

Is the location of the docs for the current version.  I suggest you do
some initial debugging by simply printing out the time that DateTime
object is creating, with something like "print $start_time".  If that
throws the bad time, jump over to the datetime@xxxxxxxx email list,
and solicit help there.  You might also try perlmonks.org (which is my
usual Perl hangout); read the "how to ask a question" docs there, and
Datetime's a well-used module that should have a solution for the
issue between the two.

That's assuming it's the problem, but I've seen similar issues
w/DateTime in the past.

>
> Again, any and all help is greatly
> appreciated!

De nada.  :)

----Woodrow



<Prev in Thread] Current Thread [Next in Thread>