mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jul 2010
Posts: 8
A
arthoz Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
A
Joined: Jul 2010
Posts: 8
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

Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
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.

Joined: Feb 2006
Posts: 546
J
Fjord artisan
Offline
Fjord artisan
J
Joined: Feb 2006
Posts: 546
that's because $asctime() takes timezone into account :P


"The only excuse for making a useless script is that one admires it intensely" - Oscar Wilde
Joined: Jun 2007
Posts: 933
5
Hoopy frood
Offline
Hoopy frood
5
Joined: Jun 2007
Posts: 933
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

Joined: Aug 2006
Posts: 183
T
Vogon poet
Offline
Vogon poet
T
Joined: Aug 2006
Posts: 183
Six hours later puts him somewhere in Europe. Since his signature says he's from Norway, it checks out.


Yar
Joined: Dec 2002
Posts: 5,411
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,411
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.


Link Copied to Clipboard