docs: def ptime(timestr=None, tzone=None, fail=0, fmt="%Y-%m-%d %H:%M:%S"):
      """Translate %Y-%m-%d %H:%M:%S into timestamp.
  
      :param timestr: string like 2018-03-15 01:27:56, or time.time() if not set.
      :param tzone: time compensation, int(-time.timezone / 3600) by default,
                  (can be set with Config.TIMEZONE).
      :param fail: while raising an exception, return it.
      :param fmt: %Y-%m-%d %H:%M:%S, %z not work.
      :rtype: int
  
          >>> ptime('2018-03-15 01:27:56')
          1521048476
      """
      tzone = Config.TIMEZONE if tzone is None else tzone
      fix_tz = -(tzone * 3600 + time.timezone)
      #: str(timestr) for datetime.datetime object
      timestr = str(timestr or ttime())
      try:
          return int(time.mktime(time.strptime(timestr, fmt)) + fix_tz)
      except:
          return fail