Buggy code:
OS . GetDateFormat ( LOCALE_USER_DEFAULT , dwFlags , systime , null , buffer , buffer . length ( ) ) ; } rect . left = rect . top = rect . right = rect . bottom = 0 ; OS . DrawText ( hDC , buffer , size , rect , flags ) ; width = Math . max ( width , ( ( rect . right ) - ( rect . left ) ) ) ; height = Math . max ( height , ( ( rect . bottom ) - ( rect . top ) ) ) ; if ( ( ( style ) & ( SWT . SHORT ) ) != 0 ) break ; } } else if ( ( ( style ) & ( SWT . TIME ) ) != 0 ) { int dwFlags = ( ( ( style ) & ( SWT . SHORT ) ) != 0 ) ? OS . TIME_NOSECONDS : 0 ; short widest = 0 ; int max = ( is24HourTime ( ) ) ? DateTime . MAX_24HOUR : DateTime . MAX_12HOUR ; for ( short i = 0 ; i < max ; i ++ ) { systime . wHour = i ; int size = OS . GetTimeFormat ( LOCALE_USER_DEFAULT , dwFlags , systime , null , buffer , buffer . length ( ) ) ; if ( size == 0 ) { buffer = new TCHAR ( getCodePage ( ) , size ) ; OS . GetTimeFormat ( LOCALE_USER_DEFAULT , dwFlags , systime , null , buffer , buffer . length ( ) ) ; } rect . left = rect . top = rect . right = rect . bottom = 0 ; OS . DrawText ( hDC , buffer , size , rect , flags ) ; if ( ( ( rect . right ) - ( rect . left ) ) > width ) { width = ( rect . right ) - ( rect . left ) ; widest = i ; } height = Math . max ( height , ( ( rect . bottom ) - ( rect . top ) ) ) ; } systime . wHour = widest ; width = widest = 0 ; for ( short i = 0 ; i < ( DateTime . MAX_MINUTE ) ; i ++ ) { systime . wMinute = i ; int size = OS . GetTimeFormat ( LOCALE_USER_DEFAULT , dwFlags , systime , null , buffer , buffer . length ( ) ) ; if ( size == 0 ) { buffer = new TCHAR ( getCodePage ( ) , size ) ; OS . GetTimeFormat ( LOCALE_USER_DEFAULT , dwFlags , systime , null , buffer , buffer . length ( ) ) ; } rect . left = rect . top = rect . right = rect . bottom = 0 ; OS . DrawText ( hDC , buffer , size , rect , flags ) ; if ( ( ( rect . right ) - ( rect . left ) ) > width ) { width = ( rect . right ) - ( rect . left ) ; widest = i ; } height = Math . max ( height , ( ( rect . bottom ) - ( rect . top ) ) ) ; } systime . wMinute = widest ; systime . wSecond = widest ; int size = OS . GetTimeFormat ( LOCALE_USER_DEFAULT , dwFlags , systime , null , buffer , buffer . length ( ) ) ; if ( size == 0 ) { buffer = new TCHAR ( getCodePage ( ) , size ) ; OS . GetTimeFormat ( LOCALE_USER_DEFAULT , dwFlags , systime , null , buffer , buffer . length ( ) ) ; } rect . left = rect . top = rect . right = rect . bottom = 0 ; OS . DrawText ( hDC , buffer , size , rect , flags ) ; width = ( rect . right ) - ( rect . left ) ; height = Math . max ( height , ( ( rect . bottom ) - ( rect . top ) ) ) ; } if ( newFont != 0 ) OS . SelectObject ( hDC , oldFont ) ; OS . ReleaseDC ( handle , hDC ) ; int upDownWidth = OS . GetSystemMetrics ( SM_CXVSCROLL ) ; width += upDownWidth + ( DateTime . MARGIN ) ; int upDownHeight = OS . GetSystemMetrics ( SM_CYVSCROLL ) ; if ( ( ! ( OS . IsWinCE ) ) && ( ( OS . WIN32_VERSION ) >= ( OS . VERSION ( 6 , 0 ) ) ) ) <START_BUG> upDownHeight ++ ; <END_BUG> height = Math . max ( height , upDownHeight ) ; } } if ( width == 0 ) width = DEFAULT_WIDTH ; if ( height == 0 ) height = DEFAULT_HEIGHT ; if ( wHint != ( SWT . DEFAULT ) ) width = wHint ; if ( hHint != ( SWT . DEFAULT ) ) height = hHint ; int border = getBorderWidth ( ) ; width += border * 2 ; height += border * 2 ; return new Point ( width , height ) ; } void createHandle ( ) { } int defaultBackground ( ) { } String getComputeSizeString ( ) { } String getCustomShortDateFormat ( ) { } String getCustomShortTimeFormat ( ) { } String getLongDateFormat ( ) { } String getShortDateFormat ( ) { } int getShortDateFormatOrdering ( ) { } String getTimeFormat ( ) { } boolean is24HourTime ( ) { } public int getDay ( ) { } public int getHours ( ) { } public int getMinutes ( ) { } public int getMonth ( ) { } String getNameText ( ) { } public int getSeconds ( ) { } public int getYear ( ) { }

Fix:
upDownHeight += 7 ;