[mapguide-commits] r8912 - sandbox/adsk/3.1n/Common/MapGuideCommon/Controller

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Mon Apr 11 00:03:02 PDT 2016


Author: hubu
Date: 2016-04-11 00:03:02 -0700 (Mon, 11 Apr 2016)
New Revision: 8912

Modified:
   sandbox/adsk/3.1n/Common/MapGuideCommon/Controller/HtmlController.cpp
Log:
Fix the issue that DateTime value cannot be displayed in selection panel.

Modified: sandbox/adsk/3.1n/Common/MapGuideCommon/Controller/HtmlController.cpp
===================================================================
--- sandbox/adsk/3.1n/Common/MapGuideCommon/Controller/HtmlController.cpp	2016-04-10 04:30:40 UTC (rev 8911)
+++ sandbox/adsk/3.1n/Common/MapGuideCommon/Controller/HtmlController.cpp	2016-04-11 07:03:02 UTC (rev 8912)
@@ -612,7 +612,7 @@
                                 //ToXmlString() won't work with dates before Jan 1, 1970, so use yyyy-mm-dd hh:mm:ss
                                 STRING dateStr;
                                 STRING str;
-                                if (dt->IsDate())
+                                if (dt->GetYear() != -1)
                                 {
                                     MgUtil::Int32ToString(dt->GetYear(), str);
                                     dateStr += str;
@@ -625,9 +625,9 @@
                                     MgUtil::PadLeft(str, 2, L'0');
                                     dateStr += str;
                                 }
-                                if (dt->IsTime())
+                                if (dt->GetHour() != -1)
                                 {
-                                    if (dt->IsDate())
+                                    if (dt->GetYear() != -1)
                                     {
                                         dateStr += L" ";
                                     }



More information about the mapguide-commits mailing list