Re: date field bug



On Sat, 2006-04-22 at 15:35 -0700, Ryan Paul wrote:
I just spent some more time experimenting with Glom 1.0 to try and
figure out the cause of the problem.

Not that may LANG is:
murrayc ubuntumurrayc:~$ echo $LANG
en_US.UTF-8

[segphault lain:~]% env | grep LANG
LANG=en_US.UTF-8
LANGUAGE=en_US:en_GB:en

Did you set that unusual combination on purpose somehow? I'm not sure
what behaviour it should dictate.

I wonder whether the behaviour is caused by Postgres's interpretation of
those environment variables, or Glom's. If you have a second computer,
it would be great to see whether it happens when using a postgres server
with a normal locale.

[snip]
The other thing I see in stdout that is probably relevant is a debug
message about date parsing:

DEBUG: Skipping std::time_get<>  because it is incapable of parsing
4-digit years in the current locale.

Yes, it has identified that Glom's translation provides a date
interpretation format string for this locale. But I don't think that's
causing the problem here.

I tried entering the date several other ways. When I type in 04/20/06,
it converts it to 4/20/6 or 20/04/6. After it converts it, the program
either experiences a segmentation fault, or emits one of two different
errors. After a segmentation fault, when I restart the program the value
in that field becomes 06/04/2020.

I'm going to add the calendar popup in 1.0, so we can at least clearly
separate parsing from display, to get to the bottom of this bug.

For your reference, I have attached a pair of images that show the error
messages. When the second one (error-2.jpg) comes up I also see the
following in stdout:


Glom  Base_DB::Query_execute(): Error while executing SQL
  UPDATE "articles" SET "date_assigned" = '20-04-06' WHERE "articles_id"
= 9
Internal error: ERROR:  date/time field value out of range: "20-04-06"
HINT:  Perhaps you need a different "datestyle" setting.

This is new and interesting.

-- 
Murray Cumming
murrayc murrayc com
www.murrayc.com
www.openismus.com




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]