MantisBT - Soldat Dedicated Server |
| View Issue Details |
|
| ID | Project | Category | View Status | Date Submitted | Last Update |
| 0000401 | Soldat Dedicated Server | Scripting Core | public | 2013-08-26 06:00 | 2014-10-08 21:25 |
|
| Reporter | Mighty | |
| Assigned To | ExHunter | |
| Priority | low | Severity | tweak | Reproducibility | always |
| Status | resolved | Resolution | fixed | |
| Platform | x86-64 | OS | Mac OS X | OS Version | 10.4 |
| Product Version | 2.7.5 | |
| Target Version | | Fixed in Version | | |
| John | |
|
| Summary | 0000401: SCv3 - StrToDate doesn't work as intended |
| Description | Function takes a string as an argument, but as if it started from index 2, e.g. "2013-08-26" will be passed as "013-08-26". However, " 2013-08-26" is not a valid input as well.
This causes StrToDate( DateToStr( Now ) ) to not work. |
| Steps To Reproduce | Every single one below causes an error.
StrToDate(DateToStr(Date()));
StrToDate(' 2013-08-26');
StrToDate(' 13/08/10');
StrToDate(' 15/03/75');
StrToDate(' 15-03-75'); |
| Additional Information | I failed in finding the working function input |
| Tags | No tags attached. |
| Relationships | |
| Attached Files | |
|
| Issue History |
| Date Modified | Username | Field | Change |
| 2013-08-26 06:00 | Mighty | New Issue | |
| 2013-09-09 13:45 | Falcon | Status | new => acknowledged |
| 2014-09-06 22:27 | ExHunter | Note Added: 0002293 | |
| 2014-09-06 22:27 | ExHunter | Assigned To | => ExHunter |
| 2014-09-06 22:27 | ExHunter | Status | acknowledged => assigned |
| 2014-09-06 23:34 | ExHunter | Note Added: 0002294 | |
| 2014-09-06 23:34 | ExHunter | Status | assigned => feedback |
| 2014-09-06 23:34 | ExHunter | Note Edited: 0002294 | bug_revision_view_page.php?bugnote_id=2294#r558 |
| 2014-09-06 23:38 | ExHunter | Note Edited: 0002294 | bug_revision_view_page.php?bugnote_id=2294#r559 |
| 2014-10-04 10:40 | Mighty | Note Added: 0002316 | |
| 2014-10-04 10:40 | Mighty | Status | feedback => assigned |
| 2014-10-04 20:33 | ExHunter | Note Added: 0002317 | |
| 2014-10-08 21:25 | ExHunter | Note Added: 0002326 | |
| 2014-10-08 21:25 | ExHunter | Status | assigned => resolved |
| 2014-10-08 21:25 | ExHunter | Resolution | open => fixed |
|
Notes |
|
|
|
|
|
|
(0002294)
|
|
ExHunter
|
2014-09-06 23:34
(edited on: 2014-09-06 23:38) |
|
Please provide feedback in the upcoming 1.6.8 beta.
Use the new stuff:
Global.ShortDateFormat := 'd/m/y';
Global.DateSeparator := '/';
before any execution of StrToDate (once is okay tho).
|
|
|
|
(0002316)
|
|
Mighty
|
|
2014-10-04 10:40
|
|
|
Issues listed before are all still present despite setting the Global properties. |
|
|
|
|
look,
try this:
Global.DateSeparator := '-';
WriteLn(DateToStr(StrToDate('15-03-75')));
for me it works. Please note that DateSeparator needs to be the same char as the separator used in your string. |
|
|
|
|
Well, closing this now (setting this to resolved)
use StrToDateTime instead in the next version. |
|