Gerhard Häring | 23 Jun 2006 22:56
Picon
Gravatar

Re: timestamp without time zone in version2.5.1


GUANG WANG wrote:
> Hi,
> 
> I installed the ver 2.5.1 on my box (redhat-release-3WS-7.4, python 2.4.3,
> postgresql8.0.8).
> For some reason, when I tried to read timestamp without time zone data,
> it is processed as a GMC time + local time zone instead of a local time. [...]

Thanks for the report (you're the third one). I'll try to release a fixed
version the next few days.

-- Gerhard
Andrew McNamara | 26 Jun 2006 06:02
Picon
Favicon

Re: timestamp without time zone in version2.5.1

>> For some reason, when I tried to read timestamp without time zone data,
>> it is processed as a GMC time + local time zone instead of a local 
time.
>
>Thanks for the report (you're the third one). I'll try to release a fixed
>version the next few days.

I started creating some "acceptance tests" for new versions of pyPgSQL to
be used with our application (www.netepi.org). I didn't get very far - the
inconsistencies with the date/time types confounded me utterly (by the way,
psycopg is even worse in this respect). My focus was to get back the same
value on select as I inserted into a table.

You might be interested in adding an elaborated version of the attached to
the pyPgSQL unit tests (once they pass!).

--

-- 
Andrew McNamara, Senior Developer, Object Craft
http://www.object-craft.com.au/

Attachment (mytests.py): text/x-python, 2036 bytes
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Pypgsql-users mailing list
(Continue reading)

Gerhard Häring | 26 Jun 2006 08:29
Picon
Gravatar

Re: timestamp without time zone in version2.5.1

Andrew McNamara wrote:
>>> For some reason, when I tried to read timestamp without time zone data,
>>> it is processed as a GMC time + local time zone instead of a local 
> time.
>> Thanks for the report (you're the third one). I'll try to release a fixed
>> version the next few days.
> 
> I started creating some "acceptance tests" for new versions of pyPgSQL to
> be used with our application (www.netepi.org). [...]
> You might be interested in adding an elaborated version of the attached to
> the pyPgSQL unit tests (once they pass!).

Thanks, this will be useful for creating date/time related tests.

As far as I can see the INTERVAL stuff is an even bigger mess.

-- Gerhard

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
Andrew McNamara | 26 Jun 2006 08:50
Picon
Favicon

Re: timestamp without time zone in version2.5.1

>Thanks, this will be useful for creating date/time related tests.
>
>As far as I can see the INTERVAL stuff is an even bigger mess.

I've been meaning to write (and contribute) a set of "end-to-end" tests
for all the data types to ensure values make the round trip unmollested -
but date/times are the only real problem area I've noticed.

BTW, we run our application with PgSQL.useUTCtimeValue=True (I think
you may have added this option to keep us happy).

--

-- 
Andrew McNamara, Senior Developer, Object Craft
http://www.object-craft.com.au/

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
GUANG WANG | 23 Jun 2006 15:46
Picon
Favicon

timestamp without time zone in version2.5.1

Hi,

I installed the ver 2.5.1 on my box (redhat-release-3WS-7.4, python 2.4.3,
postgresql8.0.8).
For some reason, when I tried to read timestamp without time zone data,
it is processed as a GMC time + local time zone instead of a local time.

Is it supposed to be so?

--FROM postgres console:
test=# \d timestamptest;
             Table "public.timestamptest"
   Column    |            Type             | Modifiers
-------------+-----------------------------+-----------
withoutzone | timestamp without time zone |
withzone    | timestamp with time zone    |

test=# insert into timestamptest values (now(),now());
INSERT 408307324 1
test=# select * from timestamptest;
        withoutzone         |           withzone
----------------------------+-------------------------------
2006-06-22 17:57:08.280913 | 2006-06-22 17:57:08.280913-04
(1 row)

--FROM API:
>>>from pyPgSQL import PgSQL
>>>pgConn=PgSQL.connect(database='test',host='localhost',user='t',password='t')
>>>pgcursor=pgConn.cursor()
>>>pgcursor.execute("select withoutzone,withzone from timestamptest limit 
(Continue reading)


Gmane