wxDateTime...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4811 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -780,7 +780,7 @@ public:
|
||||
static struct tm *GetTmNow()
|
||||
{
|
||||
time_t t = GetTimeNow();
|
||||
return localtime(&t);
|
||||
return gmtime(&t);
|
||||
}
|
||||
|
||||
private:
|
||||
|
@@ -19,6 +19,12 @@
|
||||
#pragma interface "longlong.h"
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/wxchar.h"
|
||||
#include "wx/debug.h"
|
||||
|
||||
#include <limits.h> // for LONG_MAX
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// decide upon which class we will use
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -124,6 +130,15 @@ public:
|
||||
// convert to native long long
|
||||
wxLongLong_t GetValue() const { return m_ll; }
|
||||
|
||||
// convert to long with range checking in the debug mode (only!)
|
||||
long ToLong() const
|
||||
{
|
||||
wxASSERT_MSG( (m_ll >= LONG_MIN) && (m_ll <= LONG_MAX),
|
||||
_T("wxLongLong to long conversion loss of precision") );
|
||||
|
||||
return (long)m_ll;
|
||||
}
|
||||
|
||||
// don't provide implicit conversion to wxLongLong_t or we will have an
|
||||
// ambiguity for all arithmetic operations
|
||||
//operator wxLongLong_t() const { return m_ll; }
|
||||
|
Reference in New Issue
Block a user