Code: Select all
proc gettime { offset } {
set hour [clock format [clock seconds] -format "%H"]
set therest [clock format [clock seconds] -format "%M:%S"]
set time_ret [expr $hour + $offset]
if {[expr $time_ret > 23]} { set time_ret [expr $time_ret - 24] }
if {[expr $time_ret < 0]} { set time_ret [expr $time_ret + 24] }
return $time_ret:$therest
}
Code: Select all
bind time - "00 * * * *" put:hour
proc put:hour { min hour day month year } {
putserv "PRIVMSG #NewsRoom :\0030,4» LIVE ([gettime -16] US Eastern and [gettime -13] GMT) \0030,12> Breaking News & Market Action 24/7 \0031,15> http://www.247newsroom.com \00312,12 \003"
}
Code: Select all
proc gettime { offset } {
return [clock format [expr [clock seconds] + [expr $offset] * 60 * 60] -format "%H:%M:%S"]
}