mIRC Home    About    Download    Register    News    Help

Print Thread
#37221 19/07/03 06:57 PM
Joined: May 2003
Posts: 730
S
ScatMan Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: May 2003
Posts: 730
i tried $gmt(1/1/1970 03:00:00) but it returns the "1/1/1970 03:00:00" except returning the CTIME of it, why ?

#37222 19/07/03 07:14 PM
Joined: Mar 2003
Posts: 1,271
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Mar 2003
Posts: 1,271
I have no idea what you mean here.


DALnet #Helpdesk
I hear and I forget. I see and I remember. I do and I understand. -Confucius
#37223 19/07/03 07:18 PM
Joined: Dec 2002
Posts: 2,809
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 2,809
?

#37224 19/07/03 07:23 PM
Joined: May 2003
Posts: 2,265
P
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
READ THEM LINKS AND FIND THE ANSWER YOURSELF


new username: tidy_trax
#37225 19/07/03 07:30 PM
Joined: Mar 2003
Posts: 1,271
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Mar 2003
Posts: 1,271
One could say the same thing for you, you too are asking questions that can easily be found in the helpfile. Regardless of whether or not the answer can be found there, the use of caps and bold text is inappropriate ...


DALnet #Helpdesk
I hear and I forget. I see and I remember. I do and I understand. -Confucius
#37226 19/07/03 07:55 PM
Joined: Feb 2003
Posts: 2,812
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,812
For once I have to side with pheonix. Scat-Man is being extremely irritating lately, and refuses to accept the answers given to him... so he resorts to cross-posting here.

Read his original thread on the Developer Forum.

Yes, the subject line is different (by one letter), but he's still trying to trick people into explaining how World Time works without taking the initiative to read the resources he was referred to.

- Raccoon


Well. At least I won lunch.
Good philosophy, see good in bad, I like!
#37227 19/07/03 08:11 PM
Joined: Mar 2003
Posts: 1,271
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Mar 2003
Posts: 1,271
Well that certainly was an interesting read smile Rarely encounter people who are so adamant to be spoonfed an answer instead of reading a tutorial or so for themselves. It's actually the same as with his regex question earlier.

That quote by Confucius sure comes in handy here smile


DALnet #Helpdesk
I hear and I forget. I see and I remember. I do and I understand. -Confucius
#37228 19/07/03 08:12 PM
Joined: Dec 2002
Posts: 843
P
Hoopy frood
Offline
Hoopy frood
P
Joined: Dec 2002
Posts: 843
lol - funny thing is, if he'd read the tutorial 2 days ago like was suggested, instead of arguing about it, he'd know the answer by now.


Never compare yourself to others - they're more screwed up than you think.
#37229 19/07/03 08:13 PM
Joined: May 2003
Posts: 2,265
P
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
if he hadnt been ignorant about it neither would i smile
i dont think the answer is in the help file, but he has been told many times by numerous people they wont help him until he looks at the sites provided.

Last edited by pheonix; 19/07/03 08:19 PM.

new username: tidy_trax
#37230 19/07/03 08:14 PM
Joined: Jan 2003
Posts: 2,523
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
$gmt() works exactly like $asctime(), only it returns GMT dates/times instead of dates/times in your timezone. To understand why $gmt() returns the result you mentioned, you need to read carefully how $asctime() works.

Help file:
$asctime(793947600) returns the default text format for this time value
$asctime(hh:nn:ss) returns the current time in this format
$asctime(793947600,dd/mm/yy) returns the date for this time value
.......
Note: You can specify both the N and format parameters, or only one or the other.


As you can see, $asctime() does not accept a date as a parameter: it accepts an integer (taken as seconds elapsed from 1/1/1970 0:00) and returns the date for this number, in the format you specified in the 2nd parameter. What happens if the 1st (secs) parameter is missing? mirc assumes the current $ctime. This means that you can only specify the format param and it returns the current values for H, h, n, s etc. So, $asctime(1/1/1970 03:00:00) or $gmt(1/1/1970 03:00:00) think that the "1/1/1970 03:00:00" part is the format because a simple check tells mirc that it isn't an integer, which would be the seconds; so it must be the format parameter. And since this parameter does not contain any 'evaluatable' items (ie letters H, h, n, s, m, d etc) , $asctime / $gmt return the parameter unaffected.


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
#37231 20/07/03 11:56 AM
Joined: May 2003
Posts: 730
S
ScatMan Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: May 2003
Posts: 730
oh, i thought it works like $ctime()
nevermind
thanks



#37232 20/07/03 12:12 PM
Joined: Jan 2003
Posts: 2,523
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
Yeah it's a bit of a mess. $gmt works like $ctime, but $gmt() works like $asctime() (notice the ()'s, which indicate that the identifier accepts parameters).


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com

Link Copied to Clipboard