Modify ↓
      
        Opened 17 years ago
Closed 17 years ago
#693 closed Bug (Fixed)
Error in _DateTimeFormat() function
| Reported by: | Heinz Stege <public.215.967@…> | Owned by: | Gary | 
|---|---|---|---|
| Milestone: | 3.2.13.12 | Component: | Standard UDFs | 
| Version: | 3.2.12.1 | Severity: | Blocking | 
| Keywords: | Cc: | 
Description
There seems to be a typo in the source code of the _DateTimeFormat() function (in the date.au3 file).  _DateTimeFormat() leeds to an unexpected result, if
a) the time separator (in regional options) is "/" and
b) the date separator is not equal "/" (e.g. "-")
In this (very seldom and non meaningful) case, the result looks something like:
yyyy-MM-dd hh-mm-ss
instead of
yyyy-MM-dd hh/mm/ss
Nevertheless it may be a good idea, to correct in:
	; Format DATE
	If $sTempDate <> "" Then
		;   Const $LOCALE_SDATE = 0x1D            ;  date separator
		$lngX = DllCall("kernel32.dll", "long", "GetLocaleInfo", "long", 0x400, "long", 0x1D, "str", "", "long", 255)
		If Not @error And $lngX[0] <> 0 Then
			;
			; This is the line to change:
			;$sTempTime = StringReplace($sTempTime, "/", $lngX[3])
			;
			; This is the new line:
			$sTempDate = StringReplace($sTempDate, "/", $lngX[3])
		EndIf
Thanks a lot to all AutoIT people for this nice tool.
Heinz
Attachments (0)
Change History (2)
comment:1 Changed 17 years ago by Valik
- Severity changed from None to Blocking
- Status changed from new to assigned
comment:2 Changed 17 years ago by Gary
- Milestone set to 3.2.13.12
- Resolution set to Fixed
- Status changed from assigned to closed
Guidelines for posting comments:
- You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
- In-depth discussions should take place on the forum.
For more information see the full version of the ticket guidelines here.
Note: See
        TracTickets for help on using
        tickets.
    

Fixed in version: 3.2.13.12