Forum OpenACS Q&A: Re: General Comments Error - Help Please...

Collapse
Posted by Randy Ferrer on

Caroline - The 1.11 file mostly changes "timestamptz" to "timestamp with with time zone".

The changes seem to have been made after Don's changes. (???) After looking at it, I'm a bit confused since it seems that the changes may be contrary to Don's notes:
See here

Notes from the repository:

"I've changed "timestamp" to "timestamptz" and have begun fixing some code that used to be legal but as of PG 7.3 is not. You can no longer subtract an integer from a timestamp but must cast to date, "timestamp" disappeared (must use "interval" now), "datetime" disappeared ("timestamptz"), and suchwhat. Not done but closer than it was before ..."

and

"This is the problem. They are now stored WITHOUT timezone information in PG 7.3. This change is not transparent to the code.

In order for us to support both PG 7.2 and PG 7.3 - not to mention dump-restore upgrades from 7.2 to 7.3 - we need to change all "timestamp" decls in the toolkit to "timestamptz". Grrr..."

That's right - Grrrrrrrrrrr!!!!!!!! Based on this it seems then that the change to timestamptz from timestamp is correct.So what's up with "timestamptz" to "timestamptz"? The PG 7.3 docs say that "timestamptz" is a valid data type though. So - I need to read up some more on 7.2 -> 7.3 changes and then take another look at the code tomorrow. Perhaps Don or someone else can chime in here with a clarification. Tomorrow I'll also experiment with the data model and give "timestamptz" a try and see what happens. I'm working on a project where date manipulations are core critical - lots of date calcs etc. - so I need to get this stuff clear asap. Thanks for the assist! 😊)