|
|
Joined: Jun 2003
Posts: 130
Vogon poet
|
OP
Vogon poet
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.
|
|
|
|
Joined: Feb 2003
Posts: 2,812
Hoopy frood
|
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!
|
|
|
|
Joined: Dec 2002
Posts: 1,321
Hoopy frood
|
Hoopy frood
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
|
|
|
|
Joined: Jun 2003
Posts: 130
Vogon poet
|
OP
Vogon poet
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.
|
|
|
|
Joined: Jun 2003
Posts: 130
Vogon poet
|
OP
Vogon poet
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.
|
|
|
|
Joined: Dec 2002
Posts: 1,321
Hoopy frood
|
Hoopy frood
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
|
|
|
|
Joined: Jun 2003
Posts: 130
Vogon poet
|
OP
Vogon poet
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.
|
|
|
|
Joined: Dec 2002
Posts: 1,321
Hoopy frood
|
Hoopy frood
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
|
|
|
|
Joined: Jun 2003
Posts: 130
Vogon poet
|
OP
Vogon poet
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
If only women came with popup menus and online help.
|
|
|
|
|
|