Modify ↓
Opened 17 years ago
Closed 17 years ago
#693 closed Bug (Fixed)
Error in _DateTimeFormat() function
| Reported by: | 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 by , 17 years ago
| Severity: | None → Blocking |
|---|---|
| Status: | new → assigned |
comment:2 by , 17 years ago
| Milestone: | → 3.2.13.12 |
|---|---|
| Resolution: | → Fixed |
| Status: | assigned → closed |
Note:
See TracTickets
for help on using tickets.

Fixed in version: 3.2.13.12