Page 1 of 1
Take Time System
Posted: Mon Jul 03, 2006 4:32 pm
by gnando
hello to all my question it is the following one since I can make to keep in a variable of type time the present hour from the system?
this commando works but I have left of type string
:global t1 [ :totime [:set tmp [ /system clock get time]]]
:put [:typeof t1]
str
thanks and pardon but my ingles is not good
Posted: Tue Jul 04, 2006 9:58 am
by Eugene
[ /system clock get time] works as a time value, e.g.:
/system clock set time [ /system clock get time]
Posted: Tue Jul 04, 2006 1:28 pm
by gnando
hello
a) :global t1 [ /system clock get time]
b) :environment print
t1=08:53:48
c) :put [:typeof t1]
str
the result must be time not str
thanks to respond!
Posted: Tue Jul 04, 2006 1:35 pm
by Eugene
it works anyways.
var tipe time sum and substractions
Posted: Tue Jul 04, 2006 4:08 pm
by gnando
Hello!
If but I need that it is a veriable of type time because I want to make sum and subtractions of time
Posted: Wed Jul 05, 2006 8:36 am
by Eugene
[admin@top] > :put [:totime $t1]
22:27:03
[admin@top] > :put ([:totime $t1] - 1)
22:27:02
[admin@top] > :put ([:totime $t1] - 1:00)
21:27:03
[admin@top] > :put ([:totime $t1] - 00:1:00)
22:26:03
[admin@top] >
Hope this helps.
Eugene