Return-Path: Delivered-To: apmail-ant-dev-archive@www.apache.org Received: (qmail 22764 invoked from network); 24 Aug 2007 07:41:17 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 24 Aug 2007 07:41:17 -0000 Received: (qmail 35115 invoked by uid 500); 24 Aug 2007 07:41:09 -0000 Delivered-To: apmail-ant-dev-archive@ant.apache.org Received: (qmail 35079 invoked by uid 500); 24 Aug 2007 07:41:09 -0000 Mailing-List: contact dev-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Ant Developers List" Reply-To: "Ant Developers List" Delivered-To: mailing list dev@ant.apache.org Received: (qmail 35055 invoked by uid 99); 24 Aug 2007 07:41:09 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Aug 2007 00:41:09 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jcumps@gmail.com designates 209.85.128.190 as permitted sender) Received: from [209.85.128.190] (HELO fk-out-0910.google.com) (209.85.128.190) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Aug 2007 07:41:01 +0000 Received: by fk-out-0910.google.com with SMTP id 18so669695fks for ; Fri, 24 Aug 2007 00:40:39 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:reply-to:from:to:references:subject:date:mime-version:content-type:content-transfer-encoding:x-priority:x-msmail-priority:x-mailer:x-mimeole; b=ONlQKEzX16E+if3dM9RTGZ+d1XUlFX7yT/wmzW4BybSO3zqGADVDDE1gkD8wJj4llgkW22gWlYlqm55bbe8LAI9PZCDIdCIC1T2Q9QMXD7QgdeJFV0YDopr9sUT5Z+nKzVbdC1xKJOQ6lb6uN3ypqGD+YT047+KTI02C37AuMns= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:reply-to:from:to:references:subject:date:mime-version:content-type:content-transfer-encoding:x-priority:x-msmail-priority:x-mailer:x-mimeole; b=k9M4E1TTJtfHuYnvtrYA4HucODvDf87ivBiqEHoaN/9XMkpx6PW40vHg7jQuM84c1x3Lz2/bJ8K4J8HSY7/W5rel6hovxoyhBHN2DgXFEsUbLTlp6Xo48ThEeFbvAa11XytL7HRslR77QuZQhj82DtDcdM+ahHdUhYM0oq23q5M= Received: by 10.82.182.1 with SMTP id e1mr5106070buf.1187941238488; Fri, 24 Aug 2007 00:40:38 -0700 (PDT) Received: from ramsel1 ( [80.201.41.244]) by mx.google.com with ESMTPS id d26sm190394nfh.2007.08.24.00.40.37 (version=SSLv3 cipher=RC4-MD5); Fri, 24 Aug 2007 00:40:37 -0700 (PDT) Message-ID: <000701c7e622$0f3b75a0$0201a8c0@ramsel1> Reply-To: "jcumps@gmail.com" From: To: "Ant Developers List" References: Subject: Re: timezone for junitreport, and antlib Date: Fri, 24 Aug 2007 09:40:34 +0200 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.3138 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3138 X-Virus-Checked: Checked by ClamAV on apache.org >Or I could try to convert the timezone in the junitreport >but I'm not sure how do-able that would be in XSLT. If you do it in the stylesheets, you don't need to alter JUnit java code. This link shows the XSLT functions you need, and some examples: http://www.xsltfunctions.com/xsl/fn_adjust-datetime-to-timezone.html Regards, Jan ----- Original Message ----- From: To: Sent: Friday, August 24, 2007 9:03 AM Subject: AW: timezone for junitreport, and antlib >The timestamps displayed by the 1.7.0 junitreport are in the GMT >timezone. It looks like that's determined by >DateUtils.createDateFormat() via the junit task's >XMLJUnitResultFormatter.startTestSuite(). public class XMLJUnitResultFormatter ... public void startTestSuite(JUnitTest suite) { ... //add the timestamp final String timestamp = DateUtils.format(new Date(), DateUtils.ISO8601_DATETIME_PATTERN); rootElement.setAttribute(TIMESTAMP, timestamp); public final class DateUtils { /** * ISO8601-like pattern for date-time. It does not support timezone. * yyyy-MM-ddTHH:mm:ss */ public static final String ISO8601_DATETIME_PATTERN = "yyyy-MM-dd'T'HH:mm:ss"; Yes it's done there ;) >I'd like to display them in my local timezone, or at least in the >timezone in which the junit task was run. Does anyone know how to do >this? It looks like I'd need to change Ant. It is not possible atm in Ant. >I could try adding an attribute to the junit formatter element for using >the local (or an arbitrary) timezone, altho I don't know if it would >apply to the other types of formatter. Or I could try to convert the >timezone in the junitreport (junit-frames.xsl and junit-noframes.xsl), >but I'm not sure how do-able that would be in XSLT. Which approach >would be acceptable to a committer? When I wrote the FailureRecorder () I got the problem how to configure that recorder. Passing attributes is not simple there, as this is not a task. Its not a ProjectComponent, it is a simple class. I have done this using magic System properties (ant.junit.failureCollector) so I could specify the configuration via nested . >By the way, is anyone working on externalizing the junit support to an >antlib? JUnit 4 works well enough on Ant 1.7.0, but the report still >doesn't support some features as well as it could, such as @Ignore. The Ant team does not have a JUnit AntLib - neither as project nor in the sandbox. I dont know if the JUnit team has. If I remember right, it was said, that they would maintain a JUnit AntLib ... but I dont know what the status is. Jan --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org For additional commands, e-mail: dev-help@ant.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org For additional commands, e-mail: dev-help@ant.apache.org