Can't quote.

David Hampton hampton-gnucash at rainbolthampton.net
Sun Nov 19 01:37:39 EST 2006


On Sun, 2006-11-19 at 14:09 +1100, Laurent FRANCOIS wrote:

> $ echo '(yahoo "IBM")'|gnc-fq-helper
> ERROR: Date::Manip unable to determine TimeZone.
>   at /usr/share/perl5/Date/Manip.pm line 3637
>          Date::Manip::Date_TimeZone called at 
> /usr/share/perl5/Date/Manip.pm line 678
>          Date::Manip::Date_Init() called at 
> /usr/share/perl5/Date/Manip.pm line 801
>          Date::Manip::ParseDateString('11/17/2006 4:01pm') called at 
> /usr/bin/gnc-fq-helper line 217
>          main::get_quote_time('IBM', 'HASH(0x84ec028)') called at 
> /usr/bin/gnc-fq-helper line 247
>          main::schemify_quote('IBM', 'HASH(0x84ec028)', 2) called at 
> /usr/bin/gnc-fq-helper line 280
>          main::schemify_quotes('ARRAY(0x81c6ed8)', 'HASH(0x84ec028)') 
> called at /usr/bin/gnc-fq-helper line 369

The only way I can reproduce this on my system is by removing /bin/date.

> ----#####-----
> $ export TZ=GMT+11
> lof at latitude:~$ echo $TZ
> GMT+11
> 
> $ echo '(yahoo "IBM")' | gnc-fq-helper
> (("IBM" (symbol . "IBM") (gnc:time-no-zone . "2006-11-17 16:01:00") 
> (last . 93.81) (currency . "USD")))

I get a failure when I run the commands you suggest here.  It works
correctly for me if I set TZ to GMT, EDT, and numerous other three
letter timezone abbreviations, but it fails for NCT and for GMT+11.
Looking through the Date::Manip sources, it contains an internal table
of timezones and their offsets.  NCT isn't listed.

> It should be a gnucash problem.

It isn't.  Its a problem with the Date::Manip perl module used by
GnuCash.  You can raise the issue with them of adding the NCT timezone
abbreviation, or some other solution like using the tzdata database if
its available.  An alternative that should work for you with the
existing Date::Manip module is to set TZ to the value '+1100'.  Another
alternative would be to modify Date::Manip to use '%z' instead of '%Z'
when calling the date program.  That would return a numeric time offset
instead of a timezone abbreviation, thus bypassing the internal
conversion table.

David






More information about the gnucash-user mailing list