@commands(u't', u'time')
@example(u'.t America/New_York')
def f_time(bot, trigger):
 if trigger.group(2):
  zone = get_timezone(bot.db, bot.config, trigger.group(2).strip(), None, None)
  if (not zone):
   bot.say((u'Could not find timezone %s.' % trigger.group(2).strip()))
   return
 else:
  zone = get_timezone(bot.db, bot.config, None, trigger.nick, trigger.sender)
 time = format_time(bot.db, bot.config, zone, trigger.nick, trigger.sender)
 bot.say(time)

@ commands ( u't' , u'time' ) @ example ( u'.t America/New_York' ) def f_time ( bot , trigger ) : if trigger . group ( 2 ) : zone = get_timezone ( bot . db , bot . config , trigger . group ( 2 ) . strip ( ) , None , None ) if ( not zone ) : bot . say ( ( u'Could not find timezone %s.' % trigger . group ( 2 ) . strip ( ) ) ) return else : zone = get_timezone ( bot . db , bot . config , None , trigger . nick , trigger . sender ) time = format_time ( bot . db , bot . config , zone , trigger . nick , trigger . sender ) bot . say ( time )
returns the current time .