maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sotirios Maroudas (JIRA)" <>
Subject [jira] Created: (MNG-3744) maven test java timezone
Date Fri, 05 Sep 2008 08:10:48 GMT
maven test java timezone

                 Key: MNG-3744
             Project: Maven 2
          Issue Type: Bug
    Affects Versions: 2.0.9
         Environment: Windows XP Pro 2002
            Reporter: Sotirios Maroudas
         Attachments: pom.xml

Hello maven team,

I try to execute a junit test through maven. the method is:

    public void loadData() {
        EntityTransaction tx = null;
        try {
            tx = em.getTransaction();

            Query q1 = em.createQuery("update CnCode c set c.activationDate=current_timestamp
where c.codeType=15071010");

            Query q = em.createQuery("select c from CnCode c where c.codeType=15071010");

            List l = q.getResultList();
            if (l.size() > 0) {
                CnCode c = (CnCode) l.get(0);
                 SimpleDateFormat df=new SimpleDateFormat("dd/MM/yyyy hh:mm:ss");

        } catch (RuntimeException e) {
            if (tx != null && tx.isActive()) {
            throw e; // or display error message


when i execute this method through maven the current_timestamp query parameter saves the current_timestamp
2 hours before my localtime in ORACLE Database. The Database is on the same machine with the
executing code and its timezone is GMT+2.

I then created an eclipse project and executed the same junit and the date saved correctly
in my local time. Is something happening with surefire plugin? i attach also the pom.xml


Sotiris Maroudas

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:


View raw message