@commands(u'setchanneltimeformat', u'setctf')
@example(u'.setctf %Y-%m-%dT%T%z')
def update_channel_format(bot, trigger):
 if (bot.privileges[trigger.sender][trigger.nick] < OP):
  return
 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.')
 tz = get_timezone(bot.db, bot.config, None, None, trigger.sender)
 old_format = bot.db.get_channel_value(trigger.sender, u'time_format')
 bot.db.set_channel_value(trigger.sender, u'time_format', tformat)
 try:
  timef = format_time(db=bot.db, zone=tz, channel=trigger.sender)
 except:
  bot.reply(u"That format doesn't work. Try using http://strftime.net to make one.")
  bot.db.set_channel_value(trigger.sender, u'time_format', old_format)
  return
 bot.db.set_channel_value(trigger.sender, u'time_format', tformat)
 bot.reply((u'Got it. Times in this channel  will now appear as %s unless a user has their own format set. (If the timezone is wrong, you might try the settz and channeltz commands)' % timef))

@ commands ( u'setchanneltimeformat' , u'setctf' ) @ example ( u'.setctf %Y-%m-%dT%T%z' ) def update_channel_format ( bot , trigger ) : if ( bot . privileges [ trigger . sender ] [ trigger . nick ] < OP ) : return 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.' ) tz = get_timezone ( bot . db , bot . config , None , None , trigger . sender ) old_format = bot . db . get_channel_value ( trigger . sender , u'time_format' ) bot . db . set_channel_value ( trigger . sender , u'time_format' , tformat ) try : timef = format_time ( db = bot . db , zone = tz , channel = trigger . sender ) except : bot . reply ( u"That format doesn't work. Try using http://strftime.net to make one." ) bot . db . set_channel_value ( trigger . sender , u'time_format' , old_format ) return bot . db . set_channel_value ( trigger . sender , u'time_format' , tformat ) bot . reply ( ( u'Got it. Times in this channel  will now appear as %s unless a user has their own format set. (If the timezone is wrong, you might try the settz and channeltz commands)' % timef ) )
sets your preferred format for time .