# Path: janus_time.py
# def calc_time_sec( time ) :
# 
# 	# If this function has been called on "None" or an empty string, simply
# 	# return "None".
# 
# 	if ( ( time is None ) or ( time == '' ) ) :
# 		return None
# 
# 	# Try to convert the argument "time" to a value and to round that value
# 	# to the nearest second.  If this fails, abort (returning "None").
# 
# 	time_val = calc_time_val( time )
# 
# 	if ( time_val is None ) :
# 		return None
# 
# 	time_val_sec = round( time_val, 0 )
# 
# 	# Convert the rounded time value to a string and truncate it.
# 
# 	time_str_sec = ( calc_time_str( time_val_sec ) )[0:19]
# 
# 	# Return the truncated string.
# 
# 	return time_str_sec


from janus_time import calc_time_sec
import os.path
## LOAD THE NECESSARY MODULES.
################################################################################

# Load the modules for handling dates and times.


# Load the modules for generating file names.



################################################################################
## DEFINE THE FUNCTION FOR GENERATING A BARE NAME FOR AN OUTPUT FILE.
################################################################################

def make_name( core ) :

	# Initialize the string to be returned.

	name = 'janus'


	# If the provided core has no results, return the file name as is.

	if ( len( core.series ) == 0 ) :

		return name

	# Retrieve the earliest and latest timestamps in the results of the
	# provided core, convert each to a string, and reformat each string.


# Path: janus_time.py
# def calc_time_sec( time ) :
# 
# 	# If this function has been called on "None" or an empty string, simply
# 	# return "None".
# 
# 	if ( ( time is None ) or ( time == '' ) ) :
# 		return None
# 
# 	# Try to convert the argument "time" to a value and to round that value
# 	# to the nearest second.  If this fails, abort (returning "None").
# 
# 	time_val = calc_time_val( time )
# 
# 	if ( time_val is None ) :
# 		return None
# 
# 	time_val_sec = round( time_val, 0 )
# 
# 	# Convert the rounded time value to a string and truncate it.
# 
# 	time_str_sec = ( calc_time_str( time_val_sec ) )[0:19]
# 
# 	# Return the truncated string.
# 
# 	return time_str_sec


# Path: janus_save.py
from janus_time import calc_time_sec
import os.path

## LOAD THE NECESSARY MODULES.
################################################################################

# Load the modules for handling dates and times.


# Load the modules for generating file names.



################################################################################
## DEFINE THE FUNCTION FOR GENERATING A BARE NAME FOR AN OUTPUT FILE.
################################################################################

def make_name( core ) :

	# Initialize the string to be returned.

	name = 'janus'


	# If the provided core has no results, return the file name as is.

	if ( len( core.series ) == 0 ) :

		return name

	# Retrieve the earliest and latest timestamps in the results of the
	# provided core, convert each to a string, and reformat each string.


	t1 = calc_time_sec( min( core.series['time'] ) )