mIRC Home    About    Download    Register    News    Help

Print Thread
#53732 11/10/03 03:47 PM
Joined: Oct 2003
Posts: 3
S
Scelt Offline OP
Self-satisified door
OP Offline
Self-satisified door
S
Joined: Oct 2003
Posts: 3
$asctime(3660,n:ss) returns 1:00
3660 is 1 hour 1 minute (= 61 minutes)

I think that returning 61:00 would be better than 1:00.
I dont know what is the idea of that return, imo it is NOT useful. Maybe somebody can use that, so I suggest to add N parameter to $asctime.

So then:
n - $asctime(3660,n:ss) -> 1:00
nn - $asctime(3660,nn:ss) -> 01:00
N - $asctime(3660,n:ss) -> 61:00

Think about that and respond!

Scelt

#53733 11/10/03 05:36 PM
Joined: Feb 2003
Posts: 2,812
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,812
$asctime is a function for displaying Time and Date information, and is not meant to format a duration of minutes and seconds. The reason why it only shows 1:00 for n:ss is because it's only displaying the minuts:seconds portion of Thu Jan 01 01:01:00 1970. Also, using this hacky method, you would want $gmt(3660,n:ss) because $asctime carries a timezone offset if you live outside of GMT.

You can try using this code by starbucks_mafia to get exactly what you're after.

- Raccoon


Well. At least I won lunch.
Good philosophy, see good in bad, I like!
#53734 12/10/03 02:10 PM
Joined: Oct 2003
Posts: 3
S
Scelt Offline OP
Self-satisified door
OP Offline
Self-satisified door
S
Joined: Oct 2003
Posts: 3
Oh, I wondered one day why $asctime shows 3 hours to me. $gmt works fine. Thnx pal, this helped a lot smile


Link Copied to Clipboard