Forum OpenACS Development: Response to Date formats in OpenACS

Collapse
Posted by Don Baccus on
Datetime in Postgres isn't stored as an integer, but rather a string, so we're not going to retrieve it as an integer or numeric (which is how Oracle stores dates).

We should use to_char and "'YYYY-MM-DD'" when retrieving (assuming you want to truncate out the time portion) as it works in both Oracle and Postgres, and as I mentioned before use util_AnsiDatetoPrettyDate to do the conversion.

If you want a different name than the old 3.x name for the date formatting routine, that's fine.  I don't see any reason to add a separate layer, though, we want *all* dates to be converted consistently within any given website.

So my recommendation would be to change the name, chase all references to util_AnsiDatetoPrettyDate (which is unwieldly anyway) and change them, and forget that this latter proc ever existed.

We could later add parameters to the core package to govern the actual format so those who are offended by "June 1, 2001" can pick a different one, etc.  We certainly don't need this last bit of functionality by roll-out and we certainly don't need this slowing down our porting effort, though.