Skip to content

Commit

Permalink
Fix for 30d integer overflow in DateTimeBox.
Browse files Browse the repository at this point in the history
Signed-off-by: Benoit Sigoure <[email protected]>
  • Loading branch information
oozie authored and tsuna committed Nov 12, 2012
1 parent b357269 commit ef06798
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions THANKS
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@ Jacek Masiulaniec <[email protected]>
Jari Takkala <[email protected]>
Mark Smith <[email protected]>
Paula Keezer <[email protected]>
Slawek Ligus <[email protected]>
Thomas Sanchez <[email protected]>
Tony Landells <[email protected]>
4 changes: 2 additions & 2 deletions src/tsd/client/DateTimeBox.java
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public Date parse(final DateBox box,
case 'y': interval *= 3600 * 24 * 365; break; // years
}
final Date d = new Date();
d.setTime(d.getTime() - interval * 1000);
d.setTime(d.getTime() - interval * 1000L);
return d;
} else if (text.length() == 5) { // "HH:MM"
try {
Expand Down Expand Up @@ -156,7 +156,7 @@ public void onClick(final ClickEvent event) {
}
d = new Date();
}
d.setTime(d.getTime() + seconds * 1000);
d.setTime(d.getTime() + seconds * 1000L);
d.setSeconds(0);
setDate(d);
}
Expand Down

0 comments on commit ef06798

Please sign in to comment.