Project

General

Profile

Actions

Bug #4465

closed

$ctime doesn't return any value if we provide the time part

Added by Leonel Faria almost 4 years ago. Updated almost 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Scripting
Target version:
Start date:
01/28/2019
Due date:
% Done:

0%

Estimated time:
Operative System:
All
Regression:
No

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)))

Actions #1

Updated by Per Amundsen almost 4 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.

Actions #2

Updated by Per Amundsen almost 4 years ago

  • Status changed from Resolved to Closed
Actions #3

Updated by Leonel Faria almost 4 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"

Actions #4

Updated by Per Amundsen almost 4 years ago

$ctime parsing was changed a lot in the recent beta versions, this pattern wasn't taken into account.

Actions #5

Updated by Leonel Faria almost 4 years ago

AdiIRC 3.2 64bits
//echo -a $ctime($date 16:00)
we get 1548691200

Actions #6

Updated by Per Amundsen almost 4 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.

Actions #7

Updated by Leonel Faria almost 4 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

Actions

Also available in: Atom PDF