from datetime import datetime


def MsToDate(ms):
  """Takes a value of milliseconds since the epoch and returns readable date.

  Args:
    ms: Milliseconds since the epoch.

  Returns:
    Date in form YYYY-mm-dd HH:MM:SS

  Example:
    Input: 1371575781751
    Returns: 2013-06-18 13:16:21
  """
  return datetime.fromtimestamp(ms/1000.0).strftime('%Y-%m-%d %H:%M:%S')