示例#1
0
def get_result_path(timestamp):
    """Retrieves the associated file path for a result file for a timestamp."""
    return os.path.join(
        _RESULT_FILE_DIR,
        _UPDATE_RESULT_FILENAME_FORMAT % iso8601.to_string(timestamp))
示例#2
0
 def default(self, obj):
     if isinstance(obj, datetime.datetime):
         return iso8601.to_string(obj)
     return obj