Fixed date bugs on IssueModel
| | |
| | | public List<Change> changes;
|
| | |
|
| | | public IssueModel() {
|
| | | created = new Date((System.currentTimeMillis() / 1000) * 1000);
|
| | | // the first applied change set the date appropriately
|
| | | created = new Date(0);
|
| | |
|
| | | type = Type.Defect;
|
| | | status = Status.New;
|
| | |
| | | }
|
| | |
|
| | | public void applyChange(Change change) {
|
| | | if (changes.size() == 0) {
|
| | | // first change created the issue
|
| | | created = change.created;
|
| | | }
|
| | | changes.add(change);
|
| | |
|
| | | if (change.hasFieldChanges()) {
|
| | |
| | | JsonDeserializationContext jsonDeserializationContext) {
|
| | | try {
|
| | | synchronized (dateFormat) {
|
| | | return dateFormat.parse(jsonElement.getAsString());
|
| | | Date date = dateFormat.parse(jsonElement.getAsString()); |
| | | return new Date((date.getTime() / 1000) * 1000);
|
| | | }
|
| | | } catch (ParseException e) {
|
| | | throw new JsonSyntaxException(jsonElement.getAsString(), e);
|