summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tools/source/datetime/tdate.cxx19
1 files changed, 15 insertions, 4 deletions
diff --git a/tools/source/datetime/tdate.cxx b/tools/source/datetime/tdate.cxx
index 1f2159315048..2666b8bca08c 100644
--- a/tools/source/datetime/tdate.cxx
+++ b/tools/source/datetime/tdate.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: tdate.cxx,v $
*
- * $Revision: 1.7 $
+ * $Revision: 1.8 $
*
- * last change: $Author: kz $ $Date: 2007-09-06 14:14:17 $
+ * last change: $Author: hr $ $Date: 2007-11-02 13:00:38 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -36,7 +36,10 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_tools.hxx"
-#if defined WNT
+#if defined( OS2 )
+#define INCL_DOSDATETIME
+#include <svpm.h>
+#elif defined( WNT )
#ifdef _MSC_VER
#pragma warning (push,1)
#endif
@@ -148,7 +151,15 @@ static void DaysToDate( long nDays,
Date::Date()
{
-#if defined WNT
+#if defined( OS2 )
+ DATETIME aDateTime;
+ DosGetDateTime( &aDateTime );
+
+ // Datum zusammenbauen
+ nDate = ((ULONG)aDateTime.day) +
+ (((ULONG)aDateTime.month)*100) +
+ (((ULONG)aDateTime.year)*10000);
+#elif defined WNT
SYSTEMTIME aDateTime;
GetLocalTime( &aDateTime );