Time-zone settings for database.
Posted in 2014
The poster asked whether different databases within a single Informix 11.50 instance could each have their own time zone. The consensus answer was no: the time zone is an instance-wide (server environment) setting, not a per-database property. Suggested workarounds were to set TZ per session/user environment or handle the conversion in the application layer (e.g. store times in UTC), or to store a time zone or UTC offset in minutes in a table column. Fernando noted CLIENT_TZ existed only in XPS and suggested filing an RFE.
Auto-generated by DrWatson from the posts below — may be imperfect; read the full thread.
Topics: General Discussion
Time-zone settings for database. One instance does have multiple database and we want to set different time-zones for each. so Is it possible to set or to change time-zones at database level in informix11.50.FC8W3 for one instance. Regards, Nawaz
not really, you probably want to use the app layer to set the TZ, so if the DB is UTC and the app layer is EDT/EST then times will be correct Cheers Paul > Time-zone settings for database. > > One instance does have multiple database and we want to set different > time-zones for each. > so Is it possible to set or to change time-zones at database level in > informix11.50.FC8W3 for one instance. > > Regards, > Nawaz > > > ******************************************************************************* > Forum Note: Use "Reply" to post a response in the discussion forum. > -- Paul Watson Tel: +1 913-674-0360 Mob: +1 913-387-7529 Web: www.oninit.com www.advancedatatools.com Failure is not as frightening as regret. If you want to improve, be content to be thought foolish and stupid. What this country needs are more unemployed politicians
There is no database timezone per se. Sessions have timezones and there = is an environment variable to control those. If you want to have a = timezone in your database, add a new column for it. Alternatively add = an offset from UTC in minutes (because not all timezones are multiples = of 60 minutes offset) - that is a whole lot easier to do date time math = with than a character string. j. On Jan 18, 2014, at 10:17 AM, MUHAMMAD NAWAZ SOHAIL = <nwazsohail@gmail.com> wrote: > Time-zone settings for database.=20 >=20 > One instance does have multiple database and we want to set different=20= > time-zones for each.=20 > so Is it possible to set or to change time-zones at database level in=20= > informix11.50.FC8W3 for one instance.=20 >=20 > Regards,=20 > Nawaz=20 >=20 >=20 > = **************************************************************************= *****=20 > Forum Note: Use "Reply" to post a response in the discussion forum.=20= >=20
Can you explain why you need it? On Sat, Jan 18, 2014 at 3:17 PM, MUHAMMAD NAWAZ SOHAIL <nwazsohail@gmail.com > wrote: > Time-zone settings for database. > > One instance does have multiple database and we want to set different > time-zones for each. > so Is it possible to set or to change time-zones at database level in > informix11.50.FC8W3 for one instance. > > Regards, > Nawaz > > > > ******************************************************************************* > Forum Note: Use "Reply" to post a response in the discussion forum. > > -- Fernando Nunes Portugal http://informix-technology.blogspot.com My email works... but I don't check it frequently... --001a11c322749742bd04f040ff87
There are more than one databases in one instance and earlier they was created with same time-zone and now we want to separate their time-zones at database level without to have change at instance level. Regards, Nawaz
you can';t do it at the database level, TZ is in instance. You need to tweak the TZ at the app layer Cheers Paul > There are more than one databases in one instance and earlier they was > created > with same time-zone and now we want to separate their time-zones at > database > level without to have change at instance level. > > Regards, > Nawaz > > > ******************************************************************************* > Forum Note: Use "Reply" to post a response in the discussion forum. > -- Paul Watson Tel: +1 913-674-0360 Mob: +1 913-387-7529 Web: www.oninit.com www.advancedatatools.com Failure is not as frightening as regret. If you want to improve, be content to be thought foolish and stupid. What this country needs are more unemployed politicians
What do you define as time zone? I'd say "timezone" is a geographic location property. I can understand that if your different databases are used in different geographic locations and your application(s) extract the "time" from the database server. But eventually it should be from the client. I believe that CLIENT_TZ variable which was only implemented for Informix XPS could be a solution. AFAIK there is no other way for Informix Dynamic Server. A feature request would be welcome and you can ask for it in the RFE site. Regards On Sat, Jan 18, 2014 at 4:26 PM, MUHAMMAD NAWAZ SOHAIL <nwazsohail@gmail.com > wrote: > There are more than one databases in one instance and earlier they was > created > with same time-zone and now we want to separate their time-zones at > database > level without to have change at instance level. > > Regards, > Nawaz > > > > ******************************************************************************* > Forum Note: Use "Reply" to post a response in the discussion forum. > > -- Fernando Nunes Portugal http://informix-technology.blogspot.com My email works... but I don't check it frequently... --089e013a0d42a5e7e104f0418a9a
No. The server's timezone is for the entire instance. Each user's environment can, however, set a timezone for themselves that will be obeyed for queries issued by that user. Art Art S. Kagel, Principal Consultant ASK Database Management Blog: http://informix-myview.blogspot.com/ Disclaimer: Please keep in mind that my own opinions are my own opinions and do not reflect on the IIUG, nor any other organization with which I am associated either explicitly, implicitly, or by inference. Neither do those opinions reflect those of other individuals affiliated with any entity with which I am affiliated nor those of the entities themselves. On Sat, Jan 18, 2014 at 10:17 AM, MUHAMMAD NAWAZ SOHAIL < nwazsohail@gmail.com> wrote: > Time-zone settings for database. > > One instance does have multiple database and we want to set different > time-zones for each. > so Is it possible to set or to change time-zones at database level in > informix11.50.FC8W3 for one instance. > > Regards, > Nawaz > > > > ******************************************************************************* > Forum Note: Use "Reply" to post a response in the discussion forum. > > --001a1134379630dd2704f04a2c51