2121 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
2222 * USA.
2323 *
24- * [Oracle and Java are registered trademarks of Oracle and/or its affiliates.
24+ * [Oracle and Java are registered trademarks of Oracle and/or its affiliates.
2525 * Other names may be trademarks of their respective owners.]
2626 *
2727 * --------------
3737package org .jfree .data .time ;
3838
3939import java .io .Serializable ;
40- import java .text . DateFormat ;
40+ import java .time . format . DateTimeFormatter ;
4141import java .util .Date ;
4242
4343import org .jfree .data .Range ;
@@ -118,8 +118,6 @@ public Date getLowerDate() {
118118 * @return The lower bound.
119119 *
120120 * @see #getLowerDate()
121- *
122- * @since 1.0.11
123121 */
124122 public long getLowerMillis () {
125123 return this .lowerDate ;
@@ -142,8 +140,6 @@ public Date getUpperDate() {
142140 * @return The upper bound.
143141 *
144142 * @see #getUpperDate()
145- *
146- * @since 1.0.11
147143 */
148144 public long getUpperMillis () {
149145 return this .upperDate ;
@@ -156,9 +152,9 @@ public long getUpperMillis() {
156152 */
157153 @ Override
158154 public String toString () {
159- DateFormat df = DateFormat . getDateTimeInstance () ;
160- return "[" + df .format (getLowerDate ()) + " --> "
161- + df .format (getUpperDate ()) + "]" ;
155+ DateTimeFormatter df = DateTimeFormatter . ISO_DATE_TIME ;
156+ return "[" + df .format (getLowerDate (). toInstant () ) + " --> "
157+ + df .format (getUpperDate (). toInstant () ) + "]" ;
162158 }
163159
164160}
0 commit comments