@commands(u'settimeformat', u'settf')
@example(u'.settf %Y-%m-%dT%T%z')
def update_user_format(bot, trigger):
 tformat = trigger.group(2)
 if (not tformat):
  bot.reply(u'What format do you want me to use? Try using http://strftime.net to make one.')
  return
 tz = get_timezone(bot.db, bot.config, None, trigger.nick, trigger.sender)
 old_format = bot.db.get_nick_value(trigger.nick, u'time_format')
 bot.db.set_nick_value(trigger.nick, u'time_format', tformat)
 try:
  timef = format_time(db=bot.db, zone=tz, nick=trigger.nick)
 except:
  bot.reply(u"That format doesn't work. Try using http://strftime.net to make one.")
  bot.db.set_nick_value(trigger.nick, u'time_format', old_format)
  return
 bot.reply((u'Got it. Your time will now appear as %s. (If the timezone is wrong, you might try the settz command)' % timef))

@ commands ( u'settimeformat' , u'settf' ) @ example ( u'.settf %Y-%m-%dT%T%z' ) def update_user_format ( bot , trigger ) : tformat = trigger . group ( 2 ) if ( not tformat ) : bot . reply ( u'What format do you want me to use? Try using http://strftime.net to make one.' ) return tz = get_timezone ( bot . db , bot . config , None , trigger . nick , trigger . sender ) old_format = bot . db . get_nick_value ( trigger . nick , u'time_format' ) bot . db . set_nick_value ( trigger . nick , u'time_format' , tformat ) try : timef = format_time ( db = bot . db , zone = tz , nick = trigger . nick ) except : bot . reply ( u"That format doesn't work. Try using http://strftime.net to make one." ) bot . db . set_nick_value ( trigger . nick , u'time_format' , old_format ) return bot . reply ( ( u'Got it. Your time will now appear as %s. (If the timezone is wrong, you might try the settz command)' % timef ) )
sets your preferred format for time .