Environment:
Business Objects Enterprise XI R2 SP2 Premium
Windows 2003
Tomcat
Audit DB set up on SQL Server 2005
Ok, I got all the initial issues straightened out with the Activity universe and connection and I can run the sample CR and WebI reports successfully. The interesting thing I have noticed in the Audit report data is that the timestamp is off by 5 hours. It looks like it is stamping GMT, when I think it should be US EST (-5 hours), which is what is set for Eastern Time (-5). Is there anything I am missing to get Auditor to stamp the correct time? Is it a setting in Tomcat maybe?
After several days of waiting for Business Objects Support to respond, I finally got an answer. Bottom line is that the Audit timestamp is in UTC and there isn’t anything you can do to change that. The solution is to add or subtract from that the number of hours difference your web server is from GMT, and you have to do this in the Universe or Crystal Report formula, or SQL.
Yes, I discovered this myself about the Audit timestamps just recently. The audit database is on SQL Server, so here is what I did wherever AUDIT_EVENT.Start_Timestamp was found:
If you use Crystal Reports there is a really cool new function with Crystal Reports XI R2. It’s called ShiftDateTime. It allows you to adjust your times for time zone and for daylight savings time. This is what I have used for some of my reports. I don’t know if it is available for Web Intelligence or Desktop Intelligence though.
Hi lgonzalez,
Appyling CAST is not changing the timestamp.
For example, when i excute the below sql without CAST:
SELECT DISTINCT AUDIT_EVENT.Start_Timestamp FROM AUDIT_EVENT
Result is like 02-07-2009 03:21:53 Adding CAST
SELECT DISTINCT CAST(AUDIT_EVENT.Start_Timestamp AS TIMESTAMP WITH LOCAL TIME ZONE) FROM AUDIT_EVENT
Results is like 02/JUL/09 03:21:53.000000000 AM
Problem is you’ll have to change it with every time change to/from Daylight Savings Time. Here are the time zone codes:
ADT Atlantic Daylight Time
BST Bering Standard Time
BDT Bering Daylight Time
CST Central Standard Time
CDT Central Daylight Time
EST Eastern Standard Time
EDT Eastern Daylight Time
GMT Greenwich Mean Time
HST Alaska-Hawaii Standard Time
HDT Alaska-Hawaii Daylight Time
MST Mountain Standard Time
MDT Mountain Daylight Time
NST Newfoundland Standard Time
PST Pacific Standard Time
PDT Pacific Daylight Time
YST Yukon Standard Time
YDT Yukon Daylight Time
You may want to test if it works with region names like ‘US/Pacific’ which won’t force you to change with Daylight Savings.
Else the following I think is the equivalent of what I did for SQL Server:
Hi lgonzalez,
I appreciate for your time and effort. Thanks a lot, it worked with Option 2:
I have to change the code bit to get it worked. Adjusting Audit timestamps in ORACLE
Im not sure if this will work because it doesnt take care of the GMT-PST/PDT (Im taking Pacific as an example) cutoff time, ie -7 hrs before Nov 1st sunday and -8 hrs after Nov 1st Sunday.
This will simply convert everything based on the date when the report was run and apply that hour difference (-7hrs or -8hrs) even for historical audit logs irrespective of PDT or PST