Ok, here's what I want to do:
1. Insert a date time entry (without time zone!) into PostgreSQL.
2. Get the date time field back out in a format that I can plug into PHP's date() function for formatting.
I am having a heck of a time getting a date/time field into PostgreSQL without the time zone. I've tried using now(), date_trunc('second',now()), and timestamp(current_date, current_time). They all contain a time zone, and when I plug that into date() for formatting, it gives me the crappy default 1969 date.
I suppose I could convert to a string and cut off the time zone, but who wants to do that EVERY TIME? I just need a way to get date and time into the field, sans time zone.
Any help greatly appreciated,
Chris McCormick
1. Insert a date time entry (without time zone!) into PostgreSQL.
2. Get the date time field back out in a format that I can plug into PHP's date() function for formatting.
I am having a heck of a time getting a date/time field into PostgreSQL without the time zone. I've tried using now(), date_trunc('second',now()), and timestamp(current_date, current_time). They all contain a time zone, and when I plug that into date() for formatting, it gives me the crappy default 1969 date.
I suppose I could convert to a string and cut off the time zone, but who wants to do that EVERY TIME? I just need a way to get date and time into the field, sans time zone.
Any help greatly appreciated,
Chris McCormick