commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stevencasw...@apache.org
Subject cvs commit: jakarta-commons/lang/src/java/org/apache/commons/lang/time DateUtils.java
Date Mon, 12 Jul 2004 00:04:32 GMT
stevencaswell    2004/07/11 17:04:32

  Modified:    lang/src/java/org/apache/commons/lang/time DateUtils.java
  Log:
  corrected calendar field used to calculate the offset when modifying the hour for a round
or truncated based on AM_PM
  
  Revision  Changes    Path
  1.23      +3 -3      jakarta-commons/lang/src/java/org/apache/commons/lang/time/DateUtils.java
  
  Index: DateUtils.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/lang/src/java/org/apache/commons/lang/time/DateUtils.java,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- DateUtils.java	11 Jul 2004 18:40:04 -0000	1.22
  +++ DateUtils.java	12 Jul 2004 00:04:32 -0000	1.23
  @@ -367,10 +367,10 @@
                       }
                       break;
                   case Calendar.AM_PM:
  -                    if (fields[i][0] == Calendar.HOUR) {
  +                    if (fields[i][0] == Calendar.HOUR_OF_DAY) {
                           //If we're going to drop the HOUR field's value,
                           //  we want to do this our own way.
  -                        offset = val.get(Calendar.HOUR);
  +                        offset = val.get(Calendar.HOUR_OF_DAY);
                           if (offset >= 12) {
                               offset -= 12;
                           }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message