Re: what am i doing wrong with this qualifier
Re: what am i doing wrong with this qualifier
- Subject: Re: what am i doing wrong with this qualifier
- From: Patrick Middleton <email@hidden>
- Date: Wed, 26 Jan 2011 12:20:35 +0000
So which version of PostgreSQL have you got?
http://www.postgresql.org/docs/8.0/static/datatype-datetime.html
That says: "Note: Prior to PostgreSQL 7.3, writing just timestamp was
equivalent to timestamp with time zone. This was changed for SQL
compliance."
And later it gives examples of valid time zone input. The form 'XYZ'
appears to be supported, but not 'Abc/XYZ'.
On 26 Jan 2011, at 11:47, Theodore Petrosky wrote:
So I stopped guessing (or maybe bad guessing). Here is what I saw:
1. from my nslog:
qualifier=(invoiceBookedDate =
(com.webobjects.foundation.NSTimestamp)'2010-12-06 00:00:00
Etc/GMT'),
I know this date is good. I was querying the postgresql db from
psql with a select using that datestamp and I got rows of data. So
i looked at the postgresql logs and I notice that the actual date
passing into the query is:
'2010-12-05 00:00:00 Etc/GMT'
WT_???
So i didn't change anything but selected the next day in my app (in
this case '2010-07-01..' and voila it worked as expected (I got
good data and no error). And the date passed in the postgresql logs
said the 6th.
so why was I doing this:
theDate = theDate.timestampByAddingGregorianUnits(0, 0, 0, -5, 0, 0);
I did that because I kept seeing:
'2010-12-06 05:00:00 Etc/GMT' in my logs and I knew I was only
interested in the date (without timestamp) but I never figured out
how to only pass around dates without timestamps and everything was
working. I was subtracting the 5 hours and I didn't need to. (and
it was biting me in the backend.)
Postgresql supports dates without timestamp, I wish I knew how to
do this in webobject java. (But still call them dates so I can do
date math.)
So the error has nothing to do with my WOD. I am picking up the
JasperReports example from the WOWODC 2010 videos. I guess the
example has problems with a query returning no rows.
Now if I can only figure out how to pass an array from a previous
query to JasperReports I would be happier.
I have to go back to re-reading this plethora of documentation.
Thanks for your timely help.
Ted
---
Regards Patrick
OneStep Solutions (Research) LLP
www.onestep.co.uk
This email, including any attachments, is confidential and intended solely for the person or organisation to whom it is addressed. If you are not the intended recipient you must not disseminate, distribute or copy any part of this email nor take any action in reliance on it.
If you have received this in error please notify the sender immediately by email or phone +44 (0)1702 426400 and delete this email and any attachments from your system.
Email transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of email transmission. If verification is required please request a hard-copy version.
OneStep Solutions LLP is registered in England and Wales under registration number OC337173 and has its registered office at 457 Southchurch Road, Southend-on-Sea, Essex SS1 2PH.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden