Before you consolidate, db2 "values current timezone" will show the
difference between UTC (GMT to traditionalists) and local time.
Now according to the Information Center, "the time is calculated from the
operating system time at the moment the SQL statement is executed. (The
CURRENT TIMEZONE value is determined from C runtime functions.)" - which I
guess is the TZ environment variable in AIX. However if the time zone is set
at host o/s level, I don't see how different dbs on the same server could
use different timezones excepT by setting it explicitly in the .profile and
or sqllib/userprofile, e.g. export TZ=GMT0BST - but I'm not optimistic as
the instance will already have started at that point.
You're right the programmatic alternatives are horrible - simulate different
timezones either in the application code, by triggers, by generated always
as current timestamp + n hours columns (?), or by some mass update
mechanism.
Does this help?
-----Original Message-----
From: mbruner
[mailto:db2udbdba-ezmlmshield-x36725897.[Email address protected]
Sent: 25 August 2005 20:10
To: LazyDBA Discussion
Subject: Multiple Time zones.
We are working on consolidating several of our distributed Databases
onto one centralized server. Currently these DB's are in locations
across the country and therefore, in different time zones.
When the DB's
are consolidated to the single server, they need to maintain their
"local" times. Is there a setting for a given DB that determines the
time zone or the current location time?
I know we can do this programmatically, but I was hoping there might be
a better way.
Thanks,
Mike
===============================================================
=========
=
Michael Bruner
Telephone: 502.394.7799
HFCS Database Administrator
Cell: 502.396.4153
===============================================================
=========
=
Opinions expressed are not necessarily those of United Parcel Service
===============================================================
=========
=
---------------------------------------------------------------------
PLEASE CLICK REPLY-ALL TO SEND A REPLY TO EVERYONE
website: http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html
******************************************************
The information in this E-mail and in any attachment is
confidential and is intended solely for the addressee.
Access, copying, disclosure or use of such information
by anyone else is unauthorised. If you are not the
intended recipient please contact [Email address protected]
While reasonable efforts are made to ensure these files are free
of virus infection and offensive materials, if something of this
nature is inadvertently sent to you, please destroy it, accept
our apologies and contact [Email address protected] with
details of the sender. We will ensure that action is taken
immediately to prevent any recurrence. Debenhams accept no
responsibility for any views expressed by the originator of this email.
Debenhams Retail plc (reg. no. 83395) Registered in England and Wales.
Registered office: 1 Welbeck Street, London W1G 0AA.
http://www.debenhams.com
******************************************************
DB2 & UDB email list listserv db2-l LazyDBA home page