From 86bea9e0016b2890db8ba83049dd4e89653a0a5e Mon Sep 17 00:00:00 2001 From: James Moger <james.moger@gitblit.com> Date: Fri, 16 Mar 2012 17:29:39 -0400 Subject: [PATCH] Ensure that the welcome message is interpreted as UTF-8 (issue 74) --- src/com/gitblit/models/IssueModel.java | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/src/com/gitblit/models/IssueModel.java b/src/com/gitblit/models/IssueModel.java index 246b29b..3c191e2 100644 --- a/src/com/gitblit/models/IssueModel.java +++ b/src/com/gitblit/models/IssueModel.java @@ -59,7 +59,8 @@ 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; @@ -117,6 +118,10 @@ } public void applyChange(Change change) { + if (changes.size() == 0) { + // first change created the issue + created = change.created; + } changes.add(change); if (change.hasFieldChanges()) { -- Gitblit v1.9.1