Skip to content

Commit dcb446f

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

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

influxdb/line_protocol.py

Lines 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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy