wxDateTime::Tm wxDateTime::GetTm(const TimeZone& tz) const
{
-#ifdef __VMS__
- int time2;
-#endif
wxASSERT_MSG( IsValid(), _T("invalid wxDateTime") );
time_t time = GetTicks();
}
else
{
- time += tz.GetOffset();
+ time += (time_t)tz.GetOffset();
#ifdef __VMS__ // time is unsigned so avoid warning
- time2 = (int) time;
+ int time2 = (int) time;
if ( time2 >= 0 )
#else
if ( time >= 0 )
int year)
{
// take the current month/year if none specified
- ReplaceDefaultYearMonthWithCurrent(&year, &month);
+ if ( year == Inv_Year )
+ year = GetYear();
+ if ( month == Inv_Month )
+ month = GetMonth();
return Set(GetNumOfDaysInMonth(year, month), month, year);
}
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();
{
time += tz.GetOffset();
-#ifdef __VMS__ /* time is unsigned so VMS gives a warning on the original */
- time2 = (int) time;
+#ifdef __VMS__ // time is unsigned so avoid the warning
+ int time2 = (int) time;
if ( time2 >= 0 )
#else
if ( time >= 0 )