Bug #4465
closed$ctime doesn't return any value if we provide the time part
0%
Description
$ctime doesn't return any value if we provide the time part
To reproduce://echo -ag $ctime($date 16:00)
- /echo: insufficient parameters
//echo -ag $ctime(28/01/2018 07:00:00) - /echo: insufficient parameters
This make impossible to calculate the duration between two given times for example $duration($calc($ctime($date 16:00) - $ctime($date)))
Updated by Per Amundsen almost 6 years ago
- Status changed from New to Resolved
- Operative System changed from Windows 10 to All
AdiIRC uses a different method to parse dates, each different pattern must be added manually when discovered, I added this pattern for next beta, thanks.
Updated by Per Amundsen almost 6 years ago
- Status changed from Resolved to Closed
Updated by Leonel Faria almost 6 years ago
Per Amundsen wrote:
AdiIRC uses a different method to parse dates, each different pattern must be added manually when discovered, I added this pattern for next beta, thanks.
But before 3.3 update this worked I had a script that used $duration($calc($ctime($date 16:00) - $ctime($date))) to show how much time until 16:00 and now returns 0 because of the "bug"
Updated by Per Amundsen almost 6 years ago
$ctime parsing was changed a lot in the recent beta versions, this pattern wasn't taken into account.
Updated by Leonel Faria almost 6 years ago
AdiIRC 3.2 64bits
//echo -a $ctime($date 16:00)
we get 1548691200
Updated by Per Amundsen almost 6 years ago
yes it worked in 3.2, it does not work in 3.3 after rewriting $ctime to use a different date parser because this pattern was not explicitly added/accounted for, not sure how I can make it more clear.
Updated by Leonel Faria almost 6 years ago
Per Amundsen wrote:
yes it worked in 3.2, it does not work in 3.3 after rewriting $ctime to use a different date parser because this pattern was not explicitly added/accounted for, not sure how I can make it more clear.
Sorry, you were clear enough, I just had a bad timming on the replys