|
|
Joined: Jun 2003
Posts: 129
Vogon poet
|
OP
Vogon poet
Joined: Jun 2003
Posts: 129 |
$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.
|
|
|
|
Joined: Feb 2003
Posts: 2,737
Hoopy frood
|
Hoopy frood
Joined: Feb 2003
Posts: 2,737 |
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,253
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 1,253 |
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.
|
|
|
|
Joined: Jun 2003
Posts: 129
Vogon poet
|
OP
Vogon poet
Joined: Jun 2003
Posts: 129 |
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?
|
|
|
|
Joined: Jun 2003
Posts: 129
Vogon poet
|
OP
Vogon poet
Joined: Jun 2003
Posts: 129 |
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.
|
|
|
|
Joined: Dec 2002
Posts: 1,253
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 1,253 |
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)
|
|
|
|
Joined: Jun 2003
Posts: 129
Vogon poet
|
OP
Vogon poet
Joined: Jun 2003
Posts: 129 |
Oh sorry, I meant to use gmt, but this is still stange, while $gmt(3600,h) does return 1, $gmt(1,h) returns 12.
|
|
|
|
Joined: Dec 2002
Posts: 1,253
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 1,253 |
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.
|
|
|
|
Joined: Jun 2003
Posts: 129
Vogon poet
|
OP
Vogon poet
Joined: Jun 2003
Posts: 129 |
Oh now I understand so if I was to use the 24hr format it would show me 0 hrs. Thanx guys
|
|
|
|
|
|