def deltatime(time):
  """
  Helper function that generates a difference in seconds between the deal moment
  and the start of 01.01.2020 day

    Args:
      time (str): current time in format 'YYYY-MM-DDTHH:MM:SSZ'

    Returns:
      float: seconds of difference between two dates
  """

  def leap_year(Y):
    """
    Helper function to decide is the year is a leap year or not

      Args:
        Y (int): year

      Returns:
        bool: True if it is a leap year and False in the other case
    """
    return True if ((Y%400==0) or ((Y%4==0) and (Y%100!=0))) else False

  Sum = 0
  year = int(time[:4])
  for Year in range(2020, year):
    Sum += 366 if leap_year(Year) else 365
  month = int(time[5:7])
  for Month in range(1, month):
    if (month == 2):
      Sum += 29 if leap_year(year) else 28
    elif (month in [1, 3, 5, 7, 8, 10, 12]):
      Sum += 31
    else:
      Sum += 30
  Sum += int(time[8:10]) - 1
  Sum *= 86400
  Sum += 3600*int(time[-9:-7])
  Sum += 60*int(time[-6:-4])
  Sum += int(time[-3:-1])
  return Sum