Unix timestamp support #612

Closed
sheymann opened this Issue May 2, 2012 · 6 comments

Projects

None yet

3 participants

@sheymann
Member
sheymann commented May 2, 2012

Unix timestamp is widely used to record temporal data, but Gephi does not support it.

They are integers but they mean a date, so how can we show this on the Timeline and in the Data Lab?

@sheymann sheymann was assigned May 2, 2012
@eduramiba
Member

Hi,
Actually, time of dynamic types is already stored as Unix timestamps but in milliseconds instead of just seconds.
Also they are double not integer, to support other kind of intervals the users may want.
Then this data is represented as numbers or dates in the UI.

You can change between these representations in datalab -> configuration -> time intervals as dates.
And also enter dynamic types data in cells as dates or timestamps, just make sure to do it in milliseconds adding 3 zeros.

And when importing a gexf file, you specify your times format with timeformat attribute of graph tag.
timeformat can be "double" for timestamps or other numeric intervals, "date" or "datetime".

So, if a gexf contains numbers, it should not be automatically represented as dates, but it is possible if the user wants.
But in order to not make users change representation in datalab, a "timestamp" value for timeformat could be added. It would read integers (in seconds?) and later change representation mode to datetime.

@sheymann
Member
sheymann commented May 5, 2012

So maybe a simple way to support timestamps would be to try to convert values as dates, if the number has the length of a unix timestamp (without milliseconds), and check if the conversion produces real dates.

What do you think about it? I can code it if you point me the right source file.

@eduramiba
Member

Well, any lenght is valid, considered as seconds? from 1970.
Maybe we can add an option to the import report to use numbers as dates, with some explanation about unix timestamps. That would just enable the 'time intervals as dates' option. But it would work with milliseconds.

If we want seconds, I think gexf should be extended with the timestamp timeformat for clarity.

@sheymann
Member
sheymann commented May 5, 2012

Yes, any length is valid. The question is how to know if numbers are in seconds or milliseconds.

I don't know if we should see them as dates automatically, because I can imagine cases where using seconds is much easier.

I agree on the GEXF format.

@eduramiba
Member

With the new button to change format in timeline it now should be easy to input doubles but then see dates (has to be milliseconds) if the user wants.

Then I think we will just add timestamp to gexf and read seconds there.

@sheymann
Member
sheymann commented May 7, 2012

I agree.

@sheymann sheymann added a commit that referenced this issue May 8, 2012
@sheymann sheymann Fix issue #612 by adding the support of Unix timestamp to ImporterGEX…
…F and DynamicModel
3b58262
@sheymann sheymann closed this May 8, 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