Merge "Issue #1324 make times display in 24 hour time" into development
Former-commit-id:a3c4676a49
[formerlydcff3f4711
] [formerlyca20259c16
] [formerlyca20259c16
[formerly8a07ba3c11
]] [formerlya3c4676a49
[formerlydcff3f4711
] [formerlyca20259c16
] [formerlyca20259c16
[formerly8a07ba3c11
]] [formerlye7045022ad
[formerlyca20259c16
[formerly8a07ba3c11
] [formerlye7045022ad
[formerly 40c13a1ca4345f791c9f6f3849fe896ba27a2830]]]]] Former-commit-id:e7045022ad
Former-commit-id:4c4a25a204
[formerlye6f79c3e2a
] [formerly2be953df6b
] [formerly 15bd66b75df3d0367e6065f116b28853f8d1404e [formerly 0145a91c7598ae528ddbebde30ec8710ab7722e0] [formerly2be953df6b
[formerly7baf10fc53
]]] Former-commit-id: 25899a6afa530a6ee8c6d42fba10353e83407619 [formerly 5164924ccea10acce2c3ce5e7c8e2be59f6be1d1] [formerly7be1809e99
[formerlyb4bfd19895
]] Former-commit-id: 1f670431e0b4489c02a6117d630c5e2d46788195 [formerly7be1809e99
] Former-commit-id:62d2ccbfa8
This commit is contained in:
commit
4087f7b66b
1 changed files with 10 additions and 7 deletions
|
@ -24,11 +24,13 @@ import java.io.FileInputStream;
|
|||
import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.TimeZone;
|
||||
|
||||
import org.eclipse.jface.action.Action;
|
||||
import org.eclipse.jface.action.IToolBarManager;
|
||||
|
@ -103,6 +105,8 @@ public abstract class AbstractSessionView extends CaveFloatingView {
|
|||
|
||||
private static final String SESSION_IMAGE_KEY = "sessionId.key";
|
||||
|
||||
private SimpleDateFormat dateFormatter = new SimpleDateFormat("HH:mm:ss");
|
||||
|
||||
/**
|
||||
* Mapping of images used in the view so they are not constantly created and
|
||||
* allowing them to be disposed.
|
||||
|
@ -146,6 +150,7 @@ public abstract class AbstractSessionView extends CaveFloatingView {
|
|||
userIds = CollaborationUtils.getIds();
|
||||
fonts = new HashMap<String, Font>();
|
||||
colors = new HashMap<RGB, Color>();
|
||||
dateFormatter.setTimeZone(TimeZone.getTimeZone("UTC"));
|
||||
}
|
||||
|
||||
protected void initComponents(Composite parent) {
|
||||
|
@ -330,9 +335,8 @@ public abstract class AbstractSessionView extends CaveFloatingView {
|
|||
.getAdapter(IWorkbenchSiteProgressService.class);
|
||||
service.warnOfContentChange();
|
||||
|
||||
Calendar cal = Calendar.getInstance();
|
||||
cal.setTimeInMillis(timestamp);
|
||||
String time = String.format("%1$tI:%1$tM:%1$tS %1$Tp", cal);
|
||||
Date date = new Date(timestamp);
|
||||
String time = dateFormatter.format(date);
|
||||
|
||||
String name = connection.getContactsManager().getDisplayName(
|
||||
userId);
|
||||
|
@ -596,9 +600,8 @@ public abstract class AbstractSessionView extends CaveFloatingView {
|
|||
VizApp.runAsync(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Calendar cal = Calendar.getInstance();
|
||||
cal.setTimeInMillis(System.currentTimeMillis());
|
||||
String time = String.format("%1$tI:%1$tM:%1$tS %1$Tp", cal);
|
||||
Date date = new Date();
|
||||
String time = dateFormatter.format(date);
|
||||
string.insert(0, "(" + time + ") : ");
|
||||
if (messagesText.getCharCount() != 0) {
|
||||
string.insert(0, "\n");
|
||||
|
|
Loading…
Add table
Reference in a new issue