Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unix timestamp support #612

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

Unix timestamp support #612

sheymann opened this issue May 2, 2012 · 6 comments
Assignees
Labels
Milestone

Comments

@sheymann
Copy link
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?

@ghost ghost assigned sheymann May 2, 2012
@eduramiba
Copy link
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
Copy link
Member Author

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
Copy link
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
Copy link
Member Author

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
Copy link
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
Copy link
Member Author

sheymann commented May 7, 2012

I agree.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants