Start/end attributes are always imported using DATETIME format #649

Closed
panisson opened this Issue Jun 29, 2012 · 1 comment

Comments

Projects
None yet
2 participants
@panisson
Member

panisson commented Jun 29, 2012

To reproduce this issue, create a gexf file with a dynamic graph using the date timeformat and some nodes with start and end represented as datetime.
Example:

<gexf xmlns="http://www.gexf.net/1.2draft" version="1.2">
  <graph timeformat="date" defaultedgestyle="directed" mode="dynamic">
    <attributes class="node" mode="static">
      <attribute type="string" id="0" title="desc"/>
    </attributes>
    <nodes>
      <node id="1" desc="a" start="2005-01-03 11:30:00" end="2005-01-03 11:35:00">
      </node>
      <node id="2" desc="b" start="2005-12-15 12:30:00" end="2005-12-15 12:35:00">
      </node>
    </nodes>
  </graph>
</gexf>

The dynamic node attributes will be imported using the datetime format, and not the date format.

It is nice to import it using the best precision as possible, however it has some side effects.
For example: enabling the timeline and trying to customize the bounds and interval, the default values do not pass the form validation, because the form fields are formatted using the original graph format.

This issue can be solved in three ways:

  1. update the graph fileformat to datetime if any of the imported attributes are represented as datetime;
  2. import dynamic attributes as date and truncate all datetime formatted attributes;
  3. change the forms that use date format and use datetime format.

I prefer the first option, issuing a warning in the import report informing the user about the update.

@mbastian

This comment has been minimized.

Show comment Hide comment
@mbastian

mbastian Jul 7, 2012

Owner

I think the DATE format is a subset of the DATETIME format. Basically it's a DATETIME where hours, minutes and seconds are zeros.
I don't think the 1. option is a good idea as it overrides explicit configuration. Hours, minutes and seconds should be truncated to zeros to match the DATE format. I'm fixing that. I'm also improving the display format by removing the unnecessary zeros when displaying these dates.

Owner

mbastian commented Jul 7, 2012

I think the DATE format is a subset of the DATETIME format. Basically it's a DATETIME where hours, minutes and seconds are zeros.
I don't think the 1. option is a good idea as it overrides explicit configuration. Hours, minutes and seconds should be truncated to zeros to match the DATE format. I'm fixing that. I'm also improving the display format by removing the unnecessary zeros when displaying these dates.

@ghost ghost assigned mbastian Jul 7, 2012

mbastian added a commit to mbastian/gephi that referenced this issue Jul 7, 2012

@mbastian mbastian closed this Jul 7, 2012

@mbastian mbastian added Fix Released and removed Fix Committed labels Nov 21, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment