Skip to content

Commit

Permalink
Fixed a bug with the timestamps
Browse files Browse the repository at this point in the history
  • Loading branch information
russellfunk committed Jul 20, 2017
1 parent 73f40ca commit a781dcc
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions cdindex/time_utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def timestamp_from_datetime(dt):
"""
return calendar.timegm(dt.utctimetuple())

def datetime_from_timestamp(t):
def datetime_from_timestamp(ts):
"""Convert a Unix timestamp to a datetime.
Given a Unix timestamp, this function returns a datetime. Input is assumed to
Expand All @@ -40,7 +40,7 @@ def datetime_from_timestamp(t):
Parameters
----------
t : int
ts : int
A Unix timestamp.
Returns
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def __getattr__(cls, name):
# The short X.Y version.
version = u'1.0'
# The full version, including alpha/beta/rc tags.
release = u'1.0.4'
release = u'1.0.5'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from setuptools import setup, Extension, find_packages

setup(name="cdindex",
version="1.0.4",
version="1.0.5",
description="Package for computing the cdindex.",
author="Russell J. Funk",
author_email="russellfunk@gmail.com",
Expand Down
2 changes: 1 addition & 1 deletion src/cdindex.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ void add_to_int_array(int **array, int sizeof_array, int value, bool add_memory)

/* function prototypes for graph.c */
bool is_graph_sane(Graph *graph);
void add_vertex(Graph *graph, int id, int timestamp);
void add_vertex(Graph *graph, int id, long long int timestamp);
void add_edge(Graph *graph, int source_id, int target_id);
void free_graph(Graph *graph);

Expand Down
2 changes: 1 addition & 1 deletion src/graph.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ bool is_graph_sane(Graph *graph) {
* \param id The new vertex id.
* \param timestamp The new vertex timestamp.
*/
void add_vertex(Graph *graph, int id, int timestamp) {
void add_vertex(Graph *graph, int id, long long int timestamp) {

/* allocate memory for a vertex */
Vertex *tmp;
Expand Down

0 comments on commit a781dcc

Please sign in to comment.