/[classpath]/classpath/java/util/Calendar.java
ViewVC logotype

Diff of /classpath/java/util/Calendar.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.30 by mkoch, Fri Oct 22 17:15:57 2004 UTC revision 1.31 by mark, Sun Oct 31 20:05:39 2004 UTC
# Line 347  public abstract class Calendar implement Line 347  public abstract class Calendar implement
347    private int minimalDaysInFirstWeek;    private int minimalDaysInFirstWeek;
348    
349    /**    /**
350       * Is set to true if DST_OFFSET is explicitly set. In that case
351       * it's value overrides the value computed from the current
352       * time and the timezone.
353       */
354      private boolean explicitDSTOffset = false;
355    
356      /**
357     * The version of the serialized data on the stream.     * The version of the serialized data on the stream.
358     * <dl><dt>0 or not present</dt>     * <dl><dt>0 or not present</dt>
359     * <dd> JDK 1.1.5 or later.</dd>     * <dd> JDK 1.1.5 or later.</dd>
# Line 650  public abstract class Calendar implement Line 657  public abstract class Calendar implement
657        case HOUR:        case HOUR:
658          isSet[HOUR_OF_DAY] = false;          isSet[HOUR_OF_DAY] = false;
659          break;          break;
660          case DST_OFFSET:
661            explicitDSTOffset = true;
662        }        }
663    
664      // May have crossed over a DST boundary.      // May have crossed over a DST boundary.
665      if (field != DST_OFFSET && field != ZONE_OFFSET)      if (!explicitDSTOffset && (field != DST_OFFSET && field != ZONE_OFFSET))
666        isSet[DST_OFFSET] = false;        isSet[DST_OFFSET] = false;
667    }    }
668    
# Line 676  public abstract class Calendar implement Line 685  public abstract class Calendar implement
685      isSet[DAY_OF_WEEK] = false;      isSet[DAY_OF_WEEK] = false;
686      isSet[DAY_OF_WEEK_IN_MONTH] = false;      isSet[DAY_OF_WEEK_IN_MONTH] = false;
687    
688      isSet[DST_OFFSET] = false;  // May have crossed a DST boundary.      if (!explicitDSTOffset)
689          isSet[DST_OFFSET] = false;  // May have crossed a DST boundary.
690    }    }
691    
692    /**    /**

Legend:
Removed from v.1.30  
changed lines
  Added in v.1.31

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26