$usetimezone with ODBC DAM and SQL Server

Doug Easterbrook doug at artsman.com
Tue Jan 23 00:14:17 UTC 2024

Hi Thad.

I tried this with Postgres and it was not a good combination   

To also it right, we changed all our timestamp field to timestamp with time zone in postgres

Then the right way to use time zone in Postgres was to issue a sql command

Set time zone ‘my tome zone’ where my time zone is any one of the 500 odd time zones supported by the database 

Made any time zone math easy. In that we didn’t need to do anything else with our application.   Everything worked 

Each connection can have a different time zone and you can set your servers to utc or what ever you want

So. With ms sql server, if you have the same command (I assume you will), then do that instead of using $timezone

$timezone only deals with 24 time zones. You are responsible for dealing with daylight savings time, including those that are 30 minutes off (like Newfoundland)

Makes automatic time zone change not an issue

Doug Easterbrook
Arts Management Systems Ltd.
doug at artsman.com

> On Jan 22, 2024, at 1:38 PM, Thad Bogert <thad at technosolver.com> wrote:
> Hi All,
> Has anyone had the opportunity to use the timezone conversion properties in the ODBC DAM?
> I am curious about how effective it has been.
> The current documentation for the feature is a bit sparse. It just states the following:
> If kTrue, $timezone will be applied to values inserted and fetched from TIME & TIMESTAMP columns, that is; datetime values are subject to modification by comparing the local timezone with the server’s timezone. Applies to MS-SQL Server connections only.
> If it truly converts all time and timestamp values going in and out, it will save us considerable time for readying our application for use in multiple timezones.
> Thanks,
> Thad
> _____________________________________________________________
> Manage your list subscriptions at https://lists.omnis-dev.com
> Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com

More information about the omnisdev-en mailing list