mIRC Home    About    Download    Register    News    Help

Print Thread
#144140 06/03/06 11:32 PM
Joined: Mar 2006
Posts: 10
K
KIRK_ru Offline OP
Pikka bird
OP Offline
Pikka bird
K
Joined: Mar 2006
Posts: 10
...etc
1698-1902 - don't write time and date
1903-1969 - bad time and date
1970-2037 - OK
2038-2650 - don't write time and date
2651-2854 - bad time and date
...etc
Functions:
$asctime
$ctime
$date
$day
$fulldate
$gmt
$time
$timestamp
$timezone

#144141 06/03/06 11:37 PM
Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
What?

#144142 06/03/06 11:44 PM
Joined: Mar 2006
Posts: 10
K
KIRK_ru Offline OP
Pikka bird
OP Offline
Pikka bird
K
Joined: Mar 2006
Posts: 10
Quote:
What?

change date on your PC to 2038...

#144143 07/03/06 12:10 AM
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
According to the help file, from /help $ctime
Quote:
Returns total number of seconds elapsed since 00:00:00 GMT January 1, 1970 based on your system time


Since $ctime won't return a negative value (something that I know I've seen mentioned on these boards) then it makes sense that a date with year before January 1 1970 is not going to return a correct response. The fact that you went so far back in time that you found dates that return nothing rather than an error is interesting, but, in my opinion, not very relevant.

As to the dates in the future, ie: 2038, I would imagine that the coding for mIRC will be updated to accomodate those dates as we get closer to them. Right now, by the calendar that I use, that's still over 3 decades away.

#144144 07/03/06 01:03 AM
Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
The problem is that a number that represents the year 2038 is too big to fit in a 32bit integer. As RusselB said the code will most likely be updated when it needs to be, which is not for 32 years yet grin

#144145 07/03/06 01:44 AM
Joined: Mar 2006
Posts: 10
K
KIRK_ru Offline OP
Pikka bird
OP Offline
Pikka bird
K
Joined: Mar 2006
Posts: 10
Quote:
The problem is that a number that represents the year 2038 is too big to fit in a 32bit integer. As RusselB said the code will most likely be updated when it needs to be, which is not for 32 years yet grin

On my PC there is a date - on March, 7th 7506 years. How to make so that mIRC wrote time (timestamp) in messages? It would be very much desirable to know the answer...

#144146 07/03/06 03:49 AM
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
If you can tell me how you managed to get a date in the 76th century to go on your computer, then I might be able to help. I tried changing the date on my computer to match what you said you have, and it wouldn't go. Nothing above 2099 was accepted as a valid date on my system.

#144147 07/03/06 08:03 AM
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
This is getting out of my area of knowledge, but someone else might know how to do this. I suspect that you'll have to use com objects to get the current date from the system (since $date, $ctime, etc. return either $null, errors or incorrect numbers ($ctime returned a negative number when tested after changing the date on my system with the program you provided the link for via pm)), then put the date into a variable, which could be used as a timestamp.

Again, let me say, that I'm not familiar with com objects or how they work, but that was the only thing I was able to find that looked like it might work.

#144148 08/03/06 04:27 AM
Joined: Mar 2006
Posts: 10
K
KIRK_ru Offline OP
Pikka bird
OP Offline
Pikka bird
K
Joined: Mar 2006
Posts: 10
somebody make please dll which returns time in a format [HH:nn:ss]

#144149 08/03/06 04:50 AM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
/alias [HH:nn:ss] { return $time([HH:nn:ss]) }

usage //echo the time is $[HH:nn:ss]

* Amazing eh! *


Link Copied to Clipboard