@commands(u'gettz', u'gettimezone')
@example(u'.gettz [nick]')
def get_user_tz(bot, trigger):
 if (not pytz):
  bot.reply(u"Sorry, I don't have timezone support installed.")
 else:
  nick = trigger.group(2)
  if (not nick):
   nick = trigger.nick
  nick = nick.strip()
  tz = bot.db.get_nick_value(nick, u'timezone')
  if tz:
   bot.say((u"%s's time zone is %s." % (nick, tz)))
  else:
   bot.say((u'%s has not set their time zone' % nick))

@ commands ( u'gettz' , u'gettimezone' ) @ example ( u'.gettz [nick]' ) def get_user_tz ( bot , trigger ) : if ( not pytz ) : bot . reply ( u"Sorry, I don't have timezone support installed." ) else : nick = trigger . group ( 2 ) if ( not nick ) : nick = trigger . nick nick = nick . strip ( ) tz = bot . db . get_nick_value ( nick , u'timezone' ) if tz : bot . say ( ( u"%s's time zone is %s." % ( nick , tz ) ) ) else : bot . say ( ( u'%s has not set their time zone' % nick ) )
gets a users preferred time zone .