marcosmalfatti Posted March 15, 2007 Share Posted March 15, 2007 Hi I create a report in iReport and use JasperServer to publish it in repository. When i run the report selecting from to the repository, it works fine, but when i schedule the timezone is ignored, JasperServer use default timezone independently who timezone is selected. Link to comment Share on other sites More sharing options...
lucianc Posted March 15, 2007 Share Posted March 15, 2007 What JS version are you using? What exactly do you mean by the timezone being ignored when scheduling a report? Is it about the date/time values in the report? Also, which selected timezone are we talking about: the one from the login screen or the one from the report job schedule screen? Regards,Lucian Link to comment Share on other sites More sharing options...
marcosmalfatti Posted March 16, 2007 Author Share Posted March 16, 2007 Hi Lucian I using iReport 1.3.1 and JasperServer 1.2The step-to-step of I proceed is:In the list of reports on Repository I click in the icon Schedule Report of report what I want scheduling.Then I click in the button Schedule JobI supply the Label and Description of Job and click NextI select timezone(GMT-3) the date, time and recurrence of the job and click NextFinally, I supply the Base Output File Name, select the Output Formats, Locales, Folder and Sequential File Names. And supply the Mail Address, Subject and Message Text. Select Attach Files and save.When the job run, the values os java.util.Date() fields is displayed in GMT values, independently of which I choose in job.I testing with diferents timezone, because I create GMT-3 timezone, but the results is the same, java.util.Date() is always GMT.If instead of I scheduling the report, I execute then, the values is correctly.Thank for all Link to comment Share on other sites More sharing options...
lucianc Posted March 16, 2007 Share Posted March 16, 2007 The timezone selected in the job schedule screen is currently only used to interpret the job schedule dates, and not for the date values in the report output; the dates are always formatted using the default server timezone, as you've noticed. Please log this issue as a bug here. We will analyze it and decide on a resolution. In the meantime, you can change the current behaviour by extending ReportExecutionJob:Code:public class TZSensitiveReportExecutionJob extends ReportExecutionJob { protected void updateExecutionContextDetails() { super.updateExecutionContextDetails(); String tzId = getJobDetails().getTrigger().getTimezone(); TimeZone tz = TimeZone.getTimeZone(tzId); ((ExecutionContextImpl) executionContext).setTimeZone(tz); }} I'm attaching a jar containing the compiled class for your convenience. To use the extended class, you would need to edit WEB-INF/applicationContext-report-scheduling.xml, find the "reportQuartzScheduler" and set the extended class as job class:Code:[code] <bean id="reportQuartzScheduler" class="com.jaspersoft.jasperserver.api.engine.scheduling.quartz.ReportJobsQuartzScheduler"> ... <property name="reportExecutionJobClass"> <value>com.jaspersoft.jasperserver.api.engine.scheduling.quartz.TZSensitiveReportExecutionJob</value> </property> </bean> Regards,Lucian [file name=js_schedule_tz_1.jar size=2176]http://www.jasperforge.org/components/com_joomlaboard/uploaded/files/js_schedule_tz_1.jar[/file] Link to comment Share on other sites More sharing options...
171334125 Posted November 13, 2015 Share Posted November 13, 2015 @lucianc, any update on this, was it supported in the later version or not yet now in 6.1? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now