<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_filename(self, t):

 		"""
 		Return the appropriate filename for the given time
 		based on the defined period.
 		"""

		root, ext = os.path.splitext(self.base_filename)
		# remove seconds not significant to the period
		if self._period_seconds:
			t -= t % self._period_seconds
		# convert it to a datetime object for formatting
		dt = datetime.datetime.utcfromtimestamp(t)
		# append the datestring to the filename
		# workaround for datetime.strftime not handling '' properly
		appended_date = (
			dt.strftime(self._date_format)
			if self._date_format != '' else ''
		)
		if appended_date:
			# in the future, it would be nice for this format
			#  to be supplied as a parameter.
			result = root + ' ' + appended_date + ext
		else:
			result = self.base_filename
		return result