directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From smckin...@apache.org
Subject directory-fortress-commander git commit: FC-98 - fortress-web date constraint bugs - fix begin/end time
Date Fri, 01 May 2015 04:04:05 GMT
Repository: directory-fortress-commander
Updated Branches:
  refs/heads/master 52b30c402 -> 639c9d8e5


FC-98 - fortress-web date constraint bugs - fix begin/end time


Project: http://git-wip-us.apache.org/repos/asf/directory-fortress-commander/repo
Commit: http://git-wip-us.apache.org/repos/asf/directory-fortress-commander/commit/639c9d8e
Tree: http://git-wip-us.apache.org/repos/asf/directory-fortress-commander/tree/639c9d8e
Diff: http://git-wip-us.apache.org/repos/asf/directory-fortress-commander/diff/639c9d8e

Branch: refs/heads/master
Commit: 639c9d8e5d1db3b511a674e71da9e32fabbacd19
Parents: 52b30c4
Author: Shawn McKinney <smckinney@apache.org>
Authored: Thu Apr 30 22:51:21 2015 -0500
Committer: Shawn McKinney <smckinney@apache.org>
Committed: Thu Apr 30 22:51:21 2015 -0500

----------------------------------------------------------------------
 .../directory/fortress/web/panel/ConstraintBasePanel.java     | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/directory-fortress-commander/blob/639c9d8e/src/main/java/org/apache/directory/fortress/web/panel/ConstraintBasePanel.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/web/panel/ConstraintBasePanel.java
b/src/main/java/org/apache/directory/fortress/web/panel/ConstraintBasePanel.java
index c702608..14d4baa 100644
--- a/src/main/java/org/apache/directory/fortress/web/panel/ConstraintBasePanel.java
+++ b/src/main/java/org/apache/directory/fortress/web/panel/ConstraintBasePanel.java
@@ -360,13 +360,18 @@ public class ConstraintBasePanel extends FormComponentPanel
 
     protected Date renderTime( Date date, String szTime )
     {
-        if ( szTime != null && !szTime.equalsIgnoreCase( "0000" ) )
+        if ( szTime != null )
         {
             Calendar calendar = Calendar.getInstance();
             try
             {
                 int hours = new Integer( szTime.substring( 0, 2 ) );
                 int minutes = new Integer( szTime.substring( 2, 4 ) );
+                // zero hours convert to 24 for calendar:
+                if(hours == 0)
+                {
+                    hours = 24;
+                }
                 calendar.set( 0, 0, 0, hours, minutes );
                 date = calendar.getTime();
             }


Mime
View raw message