The reason that this happens is that the Reporting Tool queries the database based on UTC time (as it is stored in the database) rather than the timezone specified within a client - the client timezone is only used for output of the reporting tool. In order to get the information for 24 hours based on the timezone specified in the client, the time based on UTC needs to be used with the -R parameter. In this case, in order to do this for all tasks run on 8/30/2011, the parameter would need to be:
To put this into Automic scripting to capture all tasks run yesterday in client 998, you would use the following:
:set &tdft# = 'YYYY-MM-DD'
:set &today# = SYS_DATE_PHYSICAL(&tdft#, UTC)
:set &todayutc# = CONV_TIMESTAMP('&today# 08:00:00')
:set &today# = conv_date('YYYY-MM-DD:&today#', 'YYYYMMDD')
:set &hour# = str_cut(&todayutc#, 12, 2)
./ucybdbrt -C0998 -Iucybdbrt.trace.ini -R&today#&hour#00 -X/automic/utilities/bin/queries/pststats.s.xml -TCSV -
@set retcode=%errorlevel%
@if NOT %ERRORLEVEL% == 0 goto :retcode