[Lazarus] Setting SQL locale

Mark Morgan Lloyd markMLl.lazarus at telemetry.co.uk
Mon Jun 13 22:46:02 CEST 2011


José Mejuto wrote:
> Hello Lazarus-List,
> 
> Monday, June 13, 2011, 8:01:44 PM, you wrote:
> 
> MML> I'm trying to send a SET TIMEZONE command to the server, to get DST
> MML> correction applied to the resultset. This has to be done using the same
> MML> handle as will be used for the query, otherwise the server thinks it's a
> MML> different session and it has no effect.
> 
> Keep warning about that! In my life I had found a lot of troubles with
> that, your DST setting could be applied blindly to the data and it
> could result in wrong times. Many code checks DST against "now", get
> the offset and apply it to the time, which is wrong for any date/time
> different than "now".

Thanks, but this is strictly read-only for data presentation, the 
underlying data is explicitly GMT which is why I'm not attempting to 
simply changes the database defaults.

-- 
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]




More information about the Lazarus mailing list