Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit dcb446f

Browse filesBrowse files
committed
Merge pull request influxdata#227 from johanfforsberg/handle-longs
Generalize integer timestamp handling (Thanks @johanfforsberg !)
2 parents 7e2dd29 + 7092ef2 commit dcb446f
Copy full SHA for dcb446f

File tree

1 file changed

+2
-1
lines changed
Filter options

1 file changed

+2
-1
lines changed

‎influxdb/line_protocol.py

Copy file name to clipboardExpand all lines: influxdb/line_protocol.py
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,14 @@
44
from calendar import timegm
55
from copy import copy
66
from datetime import datetime
7+
from numbers import Integral
78

89
from dateutil.parser import parse
910
from six import binary_type, text_type
1011

1112

1213
def _convert_timestamp(timestamp, precision=None):
13-
if isinstance(timestamp, int):
14+
if isinstance(timestamp, Integral):
1415
return timestamp # assume precision is correct if timestamp is int
1516
if isinstance(_get_unicode(timestamp), text_type):
1617
timestamp = parse(timestamp)

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.