docs: def date_to_string(date, seasonal=False):
      """Convert a date to a standard string used by Hydra. The resulting string
      looks like this::
  
          '2013-10-03 00:49:17.568-0400'
  
      Hydra also accepts seasonal time series (yearly recurring). If the flag
      ``seasonal`` is set to ``True``, this function will generate a string
      recognised by Hydra as seasonal time stamp.
      """
  
      seasonal_key = config.get('DEFAULT', 'seasonal_key', '9999')
      if seasonal:
          FORMAT = seasonal_key+'-%m-%dT%H:%M:%S.%f'
      else:
          FORMAT = '%Y-%m-%dT%H:%M:%S.%f'
      return date.strftime(FORMAT)