]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/datetime.cpp
wxHtmlWindow::OnLinkClicked and wxHtmlCell::Get/SetLink and wxHtmlWinParser::GetSetLi...
[wxWidgets.git] / src / common / datetime.cpp
index 99d5d7f0c85c734091bd6bf4a6c1f8be0307ddf7..8685319432773f5b489ef0ba33379f7020c282d2 100644 (file)
@@ -92,7 +92,7 @@
 #endif // broken strptime()
 
 #ifndef WX_TIMEZONE
-    #if defined(__MINGW32__) || defined(__VISAGECPP__)
+    #if defined(__BORLANDC__) || defined(__MINGW32__) || defined(__VISAGECPP__)
         #define WX_TIMEZONE _timezone
     #else // unknown platform - try timezone
         #define WX_TIMEZONE timezone
@@ -1128,6 +1128,9 @@ wxDateTime& wxDateTime::Set(double jdn)
 
 wxDateTime::Tm wxDateTime::GetTm(const TimeZone& tz) const
 {
+#ifdef __VMS__
+   int time2;
+#endif
     wxASSERT_MSG( IsValid(), _T("invalid wxDateTime") );
 
     time_t time = GetTicks();
@@ -1146,7 +1149,12 @@ wxDateTime::Tm wxDateTime::GetTm(const TimeZone& tz) const
         else
         {
             time += tz.GetOffset();
-            if ( time >= 0 )
+#ifdef __VMS__ /* time is unsigned so VMS gives a warning on the original */
+          time2 = (int) time;
+          if ( time2 >= 0 )
+#else
+          if ( time >= 0 )
+#endif
             {
                 tm = gmtime(&time);
 
@@ -1642,6 +1650,9 @@ wxDateTime& wxDateTime::MakeTimezone(const TimeZone& tz)
 
 wxString wxDateTime::Format(const wxChar *format, const TimeZone& tz) const
 {
+#ifdef __VMS__
+   int time2;
+#endif
     wxCHECK_MSG( format, _T(""), _T("NULL format in wxDateTime::Format") );
 
     time_t time = GetTicks();
@@ -1661,7 +1672,12 @@ wxString wxDateTime::Format(const wxChar *format, const TimeZone& tz) const
         {
             time += tz.GetOffset();
 
-            if ( time >= 0 )
+#ifdef __VMS__ /* time is unsigned so VMS gives a warning on the original */
+          time2 = (int) time;
+          if ( time2 >= 0 )
+#else
+          if ( time >= 0 )
+#endif
             {
                 tm = gmtime(&time);
 
@@ -2180,7 +2196,7 @@ const wxChar *wxDateTime::ParseRfc822Date(const wxChar* date)
     }
 
     // and now the interesting part: the timezone
-    int offset;
+    wxDateTime_t offset;
     if ( *p == _T('-') || *p == _T('+') )
     {
         // the explicit offset given: it has the form of hhmm