Hi,
I'm trying to display a timestamp column in a textbox on a form through databinding. Unfortunately rowtimetz and rowtime always shows 01.01.2000 00:00:00 instead of their real values. Only rowdate shows the correct date.
We are using an autogenerated dataset through pgSqlAdapter.
Our table looks like this
CREATE TABLE t_datetest
(
rowid bigserial NOT NULL,
rowtimetz timestamp NOT NULL DEFAULT ('now'::text)::timestamp(6) with time zone,
rowtime timestamp NOT NULL DEFAULT ('now'::text)::timestamp(6) without time zone,
rowdate date NOT NULL DEFAULT (('now'::text)::date + 14),
rowtxt varchar(256),
CONSTRAINT primkey PRIMARY KEY (rowid)
)
WITH OIDS;
ALTER TABLE t_datetest OWNER TO postgres;
INSERT INTO t_datetest(rowtxt) VALUES('test');
This Problem occurs with Version 2.10 and 2.11. We use Postgres 8.0.3 on FreeBSD.
Any help is really appreciated.
Regards
Thomas
Timestamp problem
Timestamp problem
We were unable to reproduce the problem. Can you obtain wrong values with reader.GetValue()?
Timestamp problem
Please specify the "Locale and Formatting" settings in postgresql.conf and regional options at the client side.
As a temporary solution you can use text protocol setting "protocol=2;" option at your ConnectionString.
As a temporary solution you can use text protocol setting "protocol=2;" option at your ConnectionString.
Using protocol=2 works.
Locale and Formatting settings in postgresql.conf
Locale and Formatting settings in postgresql.conf
Enviroment:# - Locale and Formatting -
#datestyle = 'iso, mdy'
#timezone = unknown # actually, defaults to TZ environment setting
#australian_timezones = false
#extra_float_digits = 0 # min -15, max 2
#client_encoding = sql_ascii # actually, defaults to database encoding
# These settings are initialized by initdb -- they might be changed
lc_messages = 'C' # locale for system error message strings
lc_monetary = 'C' # locale for monetary formatting
lc_numeric = 'C' # locale for number formatting
lc_time = 'C' # locale for time formatting
LESSOPEN=|lesspipe.sh %s
INPUTRC=/etc/inputrc
MACHTYPE=i386
USER=pgsql
MAIL=/var/mail/pgsql
HOSTNAME=postgres.company.de
SHLVL=1
VENDOR=intel
LESS=-sM
HOME=/usr/local/pgsql
GZIP=-9
PGLIB=/usr/local/lib
PAGER=/usr/bin/less -sM
NNTPSERVER=news
COLORTERM=1
GROUP=pgsql
INFOPATH=/usr/share/info:/usr/local/info
INFODIR=/usr/share/info:/usr/local/info
LOGNAME=pgsql
MORE=
BLOCKSIZE=K
PGSYSCONFDIR=/usr/local/etc/postgresql
PGLOCALEDIR=/usr/local/share/locale
LESSCHARSET=latin1
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/usr/X11R6/bin:/usr/local/pgsql/bin:/usr/opt/bin XFILESEARCHPATH=/var/X11R6/app-defaults/:/usr/X11R6/lib/X11/app-defaults/
HOST=postgres
SHELL=/bin/csh
CSHEDIT=emacs
XAPPLRESDIR=/usr/X11R6/lib/X11/app-defaults/
OSTYPE=FreeBSD
PWD=/usr/local/pgsql
PGDATA=/usr/local/pgsql/data
YARDHOME=/home/yard
FTP_PASSIVE_MODE=YES
HOSTTYPE=FreeBSD
Timestamp problem
We couldn't reproduce the problem.
Please send us complete small sample to demonstrate it.
Please send us complete small sample to demonstrate it.