Torben,
Ideally I would replace the date/time definitions in the ecommerce
data model to:
timestamp (0) without time zone
Developers can then request a timestamp which can be processed by
'clock scan' without massaging the return value from SQL.
This data model change -for all practical purposes- is not back-wards
compatible with prior ecommerce versions. It would be too involved to
update an existing ecommerce installation.
Changing the data-model would involve less changes than changing all
the functions and queries that retrieve data/time from the database
to:
select <date/time field>::timestamp(0);
However the advantage of this approach is that it doesn't involve any
data model changes and is back-wards compatible.
<rant>
Let me re-iterate that the ecommerce package is a huge and complex
package with a long history and an equally long list of developers who
worked on it. The package does a lot but the design and large portions
of the code are rather abominable. Fixing the date/time issue is
required to continue the use of the ecommerce package but for the long
run this package should really be broken up into several smaller
packages.
</rant>
So Torben, given that upgrading existing ecommerce installations
rarely ever happen -most are too customized to be upgraded- I would
recommend to change the data model and remove all Tcl code that
stripped the microsecond portion of a timestamp.
/Bart