Permalink
Browse files

Merge pull request #166 from jbrucenet/master

Fixing TypeCast errors for time based functions.
  • Loading branch information...
mleinart committed Mar 16, 2013
2 parents 7e147c0 + ef8057c commit cd59e746699226d372b1f761380c6df609f54ab2
Showing with 6 additions and 6 deletions.
  1. +6 −6 webapp/graphite/render/functions.py
@@ -2587,8 +2587,8 @@ def timeFunction(requestContext, name):
when += delta
series = TimeSeries(name,
- time.mktime(requestContext["startTime"].timetuple()),
- time.mktime(requestContext["endTime"].timetuple()),
+ int(time.mktime(requestContext["startTime"].timetuple())),
+ int(time.mktime(requestContext["endTime"].timetuple())),
step, values)
series.pathExpression = name
@@ -2619,8 +2619,8 @@ def sinFunction(requestContext, name, amplitude=1):
when += delta
return [TimeSeries(name,
- time.mktime(requestContext["startTime"].timetuple()),
- time.mktime(requestContext["endTime"].timetuple()),
+ int(time.mktime(requestContext["startTime"].timetuple())),
+ int(time.mktime(requestContext["endTime"].timetuple())),
step, values)]
def randomWalkFunction(requestContext, name):
@@ -2650,8 +2650,8 @@ def randomWalkFunction(requestContext, name):
when += delta
return [TimeSeries(name,
- time.mktime(requestContext["startTime"].timetuple()),
- time.mktime(requestContext["endTime"].timetuple()),
+ int(time.mktime(requestContext["startTime"].timetuple())),
+ int(time.mktime(requestContext["endTime"].timetuple())),
step, values)]
def events(requestContext, *tags):

0 comments on commit cd59e74

Please sign in to comment.