diff options
author | Duong Nguyen <dnguyen> | 2007-11-08 01:01:22 +0000 |
---|---|---|
committer | Duong Nguyen <dnguyen> | 2007-11-08 01:01:22 +0000 |
commit | 3a7e0bf34d0d52931474c042aa0519c07bd3879b (patch) | |
tree | 88d0bfc0eca8dcb5c4df2e1f56c2c7731011aaed /bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/DateTime.java | |
parent | 2d811a748d7c176de64251b326c38dba67acd68c (diff) | |
download | eclipse.platform.swt-3a7e0bf34d0d52931474c042aa0519c07bd3879b.tar.gz eclipse.platform.swt-3a7e0bf34d0d52931474c042aa0519c07bd3879b.tar.xz eclipse.platform.swt-3a7e0bf34d0d52931474c042aa0519c07bd3879b.zip |
Bug 206715 - DateTime#toString() behaves differently on linux/gtk/x86_64 and windows
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/DateTime.java')
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/DateTime.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/DateTime.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/DateTime.java index a10ea10f4d..56ec40c432 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/DateTime.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/DateTime.java @@ -11,6 +11,8 @@ package org.eclipse.swt.widgets; +import java.util.GregorianCalendar; + import org.eclipse.swt.internal.win32.*; import org.eclipse.swt.*; import org.eclipse.swt.events.*; @@ -543,8 +545,10 @@ public int getMonth () { return systime.wMonth - 1; } -String getNameText () { - return "DateTime"; +String getNameText() { + GregorianCalendar calendar = new GregorianCalendar(getYear(), + getMonth(), getDay(), getHours(), getMinutes(), getSeconds()); + return calendar.getTime().toString(); } /** |