LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   postgres datestyle problems... (https://www.linuxquestions.org/questions/linux-software-2/postgres-datestyle-problems-204039/)

Xing 07-12-2004 07:11 AM

postgres datestyle problems...
 
hi all;

i have used php along with postgres on slack to make a database driven application. i have a test machine and a live machine. i had changed the datestyle to ISO , US in postgres on my test machine.

now that the product is ready i shifted the whole application to live machine. needless to say, i had to chnage the datestyle on the live machine as well and i did it like this :

SET DATESTYLE TO 'iso, us';

now when i tried to run my application it gave me this error while execution of the of a query.. it is an insert query which tries to insert many data. one of the is regarding date. in PHp i am picking up date as dd/mm/yyyy:

Warning: pg_query(): Query failed: ERROR: date/time field value out of range: "17/12/1982" HINT: Perhaps you need a different "datestyle" setting. in /var/www/htdocs/recruit/details.php on line 85

i do not understand this.. i tried all the datestyle conventions on live machine.. but the problem persisted.. again i checked the datestyle of the test machine and it tells me that it is ISO, US... what to do now.. i am stuck up totally..

i have tried on live machine several times.. upto yesterday it was working fine.. this problem has started to happen today only.. upto yesterday, even the live machine was performing fine without any change in datestyle..

regards
Xing


All times are GMT -5. The time now is 07:11 AM.