mIRC Homepage
Posted By: arthoz $ctime doesnt read $asctime's 't' (a/p) - 28/07/10 06:11 AM
Try it out for yourselves:

$asctime(dd/mm/yyyy hh:nntt)
$ctime(28/07/2010 08:06am) = 1280297160
$ctime(28/07/2010 08:06pm) = 1280340360

$asctime(dd/mm/yyyy hh:nnt)
$ctime(28/07/2010 08:06a) = 1280297160
$ctime(28/07/2010 08:06p) = 1280297160 - should be 1280340360
Posted By: RusselB Re: $ctime doesnt read $asctime's 't' (a/p) - 28/07/10 07:30 AM
While I can confirm the report regarding the recognition (or lack thereof) of the p character.

The resulting times (in seconds) that you are reporting differ from the results that I got by a period of 6 hours.

Specifically, the results I'm getting show to be 6 hours later than the results that you posted.
Posted By: jaytea Re: $ctime doesnt read $asctime's 't' (a/p) - 28/07/10 08:13 AM
that's because $asctime() takes timezone into account :P
Posted By: 5618 Re: $ctime doesnt read $asctime's 't' (a/p) - 28/07/10 08:34 AM
Originally Posted By: jaytea
that's because $asctime() takes timezone into account :P

Though if he's seeing a time 6 hours *later* and RusselB is in Ontario as his signature claims, then the poster *must* be located on an island like Samoa. :P
Posted By: Thrull Re: $ctime doesnt read $asctime's 't' (a/p) - 29/07/10 02:59 AM
Six hours later puts him somewhere in Europe. Since his signature says he's from Norway, it checks out.
Posted By: Khaled Re: $ctime doesnt read $asctime's 't' (a/p) - 04/08/10 04:01 PM
Thanks, this has been fixed for the next version. This change requires a slightly stricter input format, since the letters 'a' and 'p' might overlap with letters in month names or other text. In the next version, a/p/am/pm will only be accepted if 1) they are at the end of a time value, eg. 08:06am, or 2) if they are a single word separate from all other text. If you think this might be an issue in terms of backwards compatibility please let me know.
© mIRC Discussion Forums