mIRC Home    About    Download    Register    News    Help

Print Thread
#39784 05/08/03 09:35 AM
Joined: Jun 2003
Posts: 130
O
Vogon poet
OP Offline
Vogon poet
O
Joined: Jun 2003
Posts: 130
$asctime($calc($uptime(mirc) / 1000),hh:nn:ss)
12:53:59
The actual uptime is
02:53:59
Why is there a 1 infront I dont understand.


If only women came with popup menus and online help.
#39785 05/08/03 01:30 PM
Joined: Feb 2003
Posts: 2,812
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,812
This is because $asctime is suppose to display time/date information based on the number of seconds from Jan 1 1970 00:00 GMT. Since you are in a different timezone, mIRC adds/subtracts hours to $asctime to make up the difference.

You can however use the $gmt function the same as $asctime, and it wont adjust for timezone / daylight savings... however years/months/days are still just as useless for durations.

- Raccoon


Well. At least I won lunch.
Good philosophy, see good in bad, I like!
#39786 06/08/03 05:36 AM
Joined: Dec 2002
Posts: 1,321
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Dec 2002
Posts: 1,321
In addition to Raccoon's answer (valid through 31 days), my $ymdhns() works like $duration except that it foregoes weeks, using instead years monthns days hours minutes and seconds.


DALnet: #HelpDesk and #m[color:#FF0000]IR[color:#EEEE00]C
#39787 06/08/03 11:12 AM
Joined: Jun 2003
Posts: 130
O
Vogon poet
OP Offline
Vogon poet
O
Joined: Jun 2003
Posts: 130
I still dont understand it shows how many minutes are in the seconds specified and shows the reamaining seconds so you would it show something else for hours?


If only women came with popup menus and online help.
#39788 06/08/03 11:19 AM
Joined: Jun 2003
Posts: 130
O
Vogon poet
OP Offline
Vogon poet
O
Joined: Jun 2003
Posts: 130
heres and exaple:
$time(60,n) returns 1 because there is 1 minute in 60 seconds
$time(3600,h) returns 11 it should return 1?

Last edited by obsessed; 06/08/03 11:19 AM.

If only women came with popup menus and online help.
#39789 07/08/03 04:06 AM
Joined: Dec 2002
Posts: 1,321
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Dec 2002
Posts: 1,321
Use the correct identifier for what you want to do:

$gmt(60,n) returns 1 (minute in 60 seconds)
$gmt(3600,h) returns 1 (hour in 3600 seconds)


DALnet: #HelpDesk and #m[color:#FF0000]IR[color:#EEEE00]C
#39790 07/08/03 07:42 AM
Joined: Jun 2003
Posts: 130
O
Vogon poet
OP Offline
Vogon poet
O
Joined: Jun 2003
Posts: 130
Oh sorry, I meant to use gmt, but this is still stange, while $gmt(3600,h) does return 1, $gmt(1,h) returns 12.


If only women came with popup menus and online help.
#39791 07/08/03 10:10 AM
Joined: Dec 2002
Posts: 1,321
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Dec 2002
Posts: 1,321
That is correct because a CTime of 1 is Thu Jan 01 12:00:01 1970...one second after midnight on Thursday, January 1st, 1970.


DALnet: #HelpDesk and #m[color:#FF0000]IR[color:#EEEE00]C
#39792 08/08/03 07:55 AM
Joined: Jun 2003
Posts: 130
O
Vogon poet
OP Offline
Vogon poet
O
Joined: Jun 2003
Posts: 130
Oh now I understand so if I was to use the 24hr format it would show me 0 hrs. Thanx guys smile


If only women came with popup menus and online help.

Link Copied to Clipboard