Hi arborint - thanks for the help - perhaps if I gave a little more insight as to the purpose of the code that may help?
Badically a client wants to insert into the backend to from dates for a booking service. The user then selects a place they want to stay and from which date to which date they want to stay there. I have coded my sql to to basically say get a row where placeId = the place where they want to stay and the from field is => than the requested from date and the to date is < than the todate field, so basically my code is trying to bracket a price within a given set of dates. The easiest way I could see of doing this was to convert my $_post dd/mm/yy into a unix time stamp and send the two converted dates into the db. But the problem I'm having is my back end editor is inserting data incorrectly.
If I get a timecode from the db, a random one and check it with an online convertor, the time is always either 01:00:00 instead of 00:00:00 or 00:59:59 instead of 23:59:59!!
Yet, when I open up my booking editor, so I can adjust dates, prices etc, I get back all of the rows with the unix stamps converted into the right times.
I'm really confused.
thanks
frank