zigdon / twirssi

An irssi script allowing the use of Twitter from within the IRC client.
http://twirssi.com
134 stars 26 forks source link

The 'epoch' parameter (undef) to DateTime::from_epoch did not pass regex check #52

Closed tsujigiri closed 12 years ago

tsujigiri commented 12 years ago

Since today twirssi crashes with the following error:

20:59:54 -!- Irssi: Error in script twirssi:
20:59:54 The 'epoch' parameter (undef) to DateTime::from_epoch did not pass regex check
20:59:54  at /usr/lib/perl5/DateTime.pm line 461
20:59:54 IDateTime::from_epoch(undef, 'epoch', undef, 'time_zone', 'DateTime::TimeZone::Europe::Berlin=HASH(0x2a3f270)') called at /home/helge/.irssi/scripts/autorun/twirssi.pl line 2776
20:59:54 IIrssi::Script::twirssi::write_lines('ARRAY(0x2c9a128)', 1) called at /home/helge/.irssi/scripts/autorun/twirssi.pl line 2643
20:59:54 IIrssi::Script::twirssi::monitor_child('ARRAY(0x2d147d0)') called at -e line 0
20:59:54 Ieval {...} called at -e line 0

Happens with versions 2.5.1 and 2.5.2beta4 (no other versions tried) on an up-to-date Debian stable. Might be a DST issue. In case it matters, Germany switches to summer time in two weeks.

gedge commented 12 years ago

What version of DateTime do you have? (Mine is 0.72)

$ perl -MDateTime -E 'say $DateTime::VERSION;'

tsujigiri commented 12 years ago

In the meantime I upgraded all the modules via CPAN and it seems to work now. Not sure if this is supposed to be done this way, when everything Perl was installed via apt. Does CPAN keep a log, where I can see what the version was before?

gedge commented 12 years ago

Glad to hear it's working.

CPAN history? Not that I know of. But, perhaps apt will tell you what versions are available (i.e. were on the system) if they weren't bundled.

tsujigiri commented 12 years ago

Now it happened again. DateTime's version is 0.72 now.

gedge commented 12 years ago

What's the full error message?

tsujigiri commented 12 years ago

What I quoted above is all I see in irssi.

tsujigiri commented 12 years ago

One more hint: the twirssi window itself says Day changed to 1970-01-01.

gedge commented 12 years ago

what does /etc/timezone contain, on your system?

(I'm reading 16.1 from http://www.debian.org/doc/manuals/system-administrator/ch-sysadmin-time.html )

gedge commented 12 years ago

you might have some output left on your system (in /tmp or /var/tmp) e.g. in a file /tmp/tw_* which contains the offending line(s), try

$ perl -ne '/epoch:($|\D|0)/ and print' /tmp/tw_*

Does this show anything?

tsujigiri commented 12 years ago

/etc/timezone: Europe/Berlin

There are some files in /tmp, but none of them has a match.

tsujigiri commented 12 years ago

Looks like it happens when adding a subscription with more than one word (e.g. /twitter_subscribe foo bar).

gedge commented 12 years ago

thanks, yes, that's a fixable bug - will get new code up soon

gedge commented 12 years ago

uploaded a fix, please try

tsujigiri commented 12 years ago

Perfect. Thanks a lot!