The problem occurs where I am just setting the param values of the query.
In my delphi code:
Code: Select all
Query.ParamByName('datetime').AsPgTimeStamp.TimeZoneOffset := 0;
Code: Select all
Query.ParamByName('datetime').AsPgTime.TimeZoneOffset := 0;
It is just strange when HasTimeZone is settable for AsPgTimeStamp, and that TimeZoneOffset is settable for AsPgTime.
I can work around with formatting strings. But it would be nice to be able to specify numerically.
I can see the value is initialised to the local time of the machine. So one could work with that. I want to insert as UTC, but i can convert back to local time then insert using this. Just seems haphazard.
Is this a known issue? Or am I just going about this in the wrong way? (E.g. it is only intended to be populated via the dataset or other means and to be read only. But then why can we set HasTimeZone?).
Thanks!