Bug 320365 Excel emitter don't use reportContext timezone
- Create a blank report ; - Insert a "Data" Object of type "Date Time" without databinding. Write "new Date();" for the javascript expression ; - When invoking your report from the web viewer, configure a timezone with "__timezone" parameter. For instance, for me, "&__timezone=Europe/Paris" (GMT+2) ; - My JVM uses UTC ; - When using frameset servlet, in my browser, i have the right date. For instance 19/07/2010 18:19 (pattern is dd/MM/yyyy HH:mm). ; - When exporting to excel, I obtain a UTC date. For instance : 19/07/2010 16:19 (same pattern) ; - All others emitters are good. I get this issue only with excel. It seems that in jar org.eclipse.birt.report.engine.emitter.prototype.excel.xxx.jar, file org.eclipse.birt.report.engine.emitter.excel.ExcelUtil, method #formatDate, when formatting date as a String with a SimpleDateFormat, you don't use any timezone. Maybe the issue is here. public static String formatDate( Object data ) { SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss", Locale.ENGLISH ); Date date = getDate( data ); if(date == null) { return null; } return dateFormat.format( date ); } An ugly solution is to set the default TimeZone in your initialize script : com.ibm.icu.util.TimeZone.setDefault(reportContext.getTimeZone());
engine/org.eclipse.birt.report.engine.emitter.prototype.excel/src/org/eclipse/birt/report/engine/emitter/excel/ExcelUtil.java
namedPatterns.put( "General Nu", "General" );
		
	}
	public final static float INCH_PT = 72;
	public final static float PT_TWIPS = 20;
	public final static float INCH_TWIPS = INCH_PT * PT_TWIPS;
	public final static int PAPER_LETTER = 1;// 8.5in*11in
	public final static int PAPER_TABLOID = 3;// 11in*17in
	public final static int PAPER_LEGAL = 5;// 8.5in*14in
	public final static int PAPER_STATEMENT = 6;// 5.5in*8.5in
	public final static int PAPER_EXECUTIVE = 7;// 7.25in*10.5in
	public final static int PAPER_A3 = 8;// 297mm*420mm
	public final static int PAPER_A4 = 9;// 210mm*297mm
	public final static int PAPER_A5 = 11;// 148mm*210mm
	public final static int PAPER_B4 = 12;// 250mm*353mm
	public final static int PAPER_B5 = 13;// 176mm*250mm
	public final static int PAPER_FOLIO = 14;// 8.5in*13in
	public final static int PAPER_10_ENVELOP = 20;// 4.125in*9.5in;
	public final static int PAPER_DL_ENVELOPE = 27;// 110mm*220mm
	public final static int PAPER_C5_ENVELOPE = 28;// 162mm*229mm
	public final static int PAPER_B5_ENVELOPE = 34;// 176mm*250mm
	public final static int PAPER_MONARCH_ENVELOPE = 37;// 3.875in*7.5in
	public final static int PAPER_ISOB4 = 42;// 250mm*353mm;
	public static String ridQuote( String val )
	{
		if ( val.charAt( 0 ) == '"' && val.charAt( val.length( ) - 1 ) == '"' )
		{
			return val.substring( 1, val.length( ) - 1 );
		}
		return val;