All pastes #392925 Raw Edit

Anonymous

public text v1 · immutable
·published 2007-03-13 05:15 UTC
rendered paste body
on *:TEXT:!gmt*:#: {
  $iif($len($2 == 3),var %hours = $right($2,2),var %hours = $right($2,1))
  if ($pos($1-,$chr(43),1) != 6 || $pos($1-,$chr(45),1) != 6 || %hours > 12 || %hours !isnum) {
    .notice $nick Error! Usage is !gmt +hr or !gmt -hr (hr must be 0 - 12) | halt
  }
  else {
    .notice $nick GMT $2 = $asctime($calc($gmt $left($2,1) (%hours * 3600)))
  }
}