Custom Query

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (133 - 135 of 3870)

Ticket Resolution Summary Owner Reporter
#464 Fixed GUICtrlCreateAvi on Windows Vista Valik Carsten8
Description

GUICtrlCreateAvi with a DLL Files doesn't work on Windows Vista.

#465 Fixed _DateTimeSplit() results cause erroneous calc results when "Seconds" is missing Gary cbruce
Description

I believe that the _DateTimeSplit() function is behaving incorrectly.

AutoIT allows us to use DateTime values that do NOT include "Seconds" in our calculations. But if you use such DateTime values in _DateAdd(), you get erroneous results.

Example:

$x = _DateAdd( 'h', 1, "2008/01/01 01:00")

Results in a value of "2008/01/01 01:59" instead of "2008/01/01 02:00".

The problem lies in the _DateTimeSplit() function, which is inserting "-1" into Time fields when there is missing input.

I believe the correct behavior should be to insert "0" into the Time fields in this condition.

Func _DateTimeSplit($sDate, ByRef $asDatePart, ByRef $iTimePart)
	Local $sDateTime
	Local $x
	; split the Date and Time portion
	$sDateTime = StringSplit($sDate, " T")
	; split the date portion
	If $sDateTime[0] > 0 Then $asDatePart = StringSplit($sDateTime[1], "/-.")
	; split the Time portion
	If $sDateTime[0] > 1 Then
		$iTimePart = StringSplit($sDateTime[2], ":")
		If UBound($iTimePart) < 4 Then ReDim $iTimePart[4]
	Else
		Dim $iTimePart[4]
	EndIf
	; Ensure the arrays contain 4 values
	If UBound($asDatePart) < 4 Then ReDim $asDatePart[4]
	; update the array to contain numbers not strings
	For $x = 1 To 3
		If StringIsInt($asDatePart[$x]) Then
			$asDatePart[$x] = Number($asDatePart[$x])
		Else
			$asDatePart[$x] = -1
		EndIf
		If StringIsInt($iTimePart[$x]) Then
			$iTimePart[$x] = Number($iTimePart[$x])
		Else
;	=============  PROBLEM  =================
			$iTimePart[$x] = -1
;	=============  PROBLEM  =================
;	=============  CHANGE  =================
			$iTimePart[$x] = 0
;	=============  CHANGE  =================
		EndIf
	Next
	Return (1)
EndFunc   ;==>_DateTimeSplit
#475 Fixed StringSplit() does not honor flag 2 when using "" (empty) as delim Valik wraithdu
Description

StringSplit() is returning the array count in $array[0] when the delimiter is "" (blank), even though flag = 2 is set. Ex -

#include <Array.au3>

$string = "thequickbrownfox"
$array = StringSplit($string, "")
_ArrayDisplay($array)
$array = StringSplit($string, "", 2)
_ArrayDisplay($array)
Note: See TracQuery for help on using queries.