Bug #4465
closed
$ctime doesn't return any value if we provide the time part
Added by Leonel Faria almost 6 years ago.
Updated almost 6 years ago.
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)))
- 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.
- Status changed from Resolved to Closed
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"
$ctime parsing was changed a lot in the recent beta versions, this pattern wasn't taken into account.
AdiIRC 3.2 64bits
//echo -a $ctime($date 16:00)
we get 1548691200
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.
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
Also available in: Atom
PDF