old_contents: @bot.message_handler(commands=['date', 'time'])
  def time_message(message):
    userid = message.from_user.id
    banlist = redisserver.sismember('zigzag_banlist', '{}'.format(userid))
    if banlist:
      return
    time = str(datetime.datetime.now())
    bot.send_message(message.chat.id, TIME_MSG.format(time), parse_mode="HTML")
  
new_contents: # -*- coding: utf-8 -*-
  
  @bot.message_handler(commands=['date', 'time'])
  def time_message(message):
    userid = message.from_user.id
    banlist = redisserver.sismember('zigzag_banlist', '{}'.format(userid))
    if banlist:
      return
    if len(message.text.split()) < 2:
      bot.reply_to(message, "Enter a time zone/city/region/etc. please! \n\nExample: `/weather Tehran`", parse_mode="Markdown")
      return
    city = message.text.split()[1]
    try:
      tzd = json.load(urllib.urlopen("https://maps.googleapis.com/maps/api/geocode/json?address={}".format(city)))
      if str(tzd["status"]) == "OK":
        latlng = str(tzd["results"][0]["geometry"]["location"])
        lat = str(latlng["lat"])
        lng = str(latlng["lng"])
        tzl = json.load(urllib.urlopen("https://maps.googleapis.com/maps/api/timezone/json?location={}&timestamp=1331161200".format(lat + "," + lng)))
        timezone = tzl["timeZoneId"]
      else:
        bot.reply_to(message, "Timezone not found.")
        return
    except:
      print("[Time] Exception occured")
      return
    time = json.load(urllib.urlopen("https://script.google.com/macros/s/AKfycbyd5AcbAnWi2Yn0xhFRbyzS4qMq1VucMVgVvhul5XqS9HkAyJY/exec?tz={}".format(timezone)))
    bot.send_message(message.chat.id, "Current time in *" + timezone + "*: \n" + time["fulldate"], parse_mode="Markdown")
  
subject: Update time.py