question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Make default timestamps in Unix Epoch, not RFC3339 format

See original GitHub issue

Hi (again)!,

I was reading the documentation on influx, and it says that for HTTP requests, I can include the query param epoch=ns to retrieve my data with time in some epoch format like 1503604775 instead of 2017-08-24T19:59:35.000Z. However, when reading the node-influx docs, it seems to only mention a precision option without allowing me to convert to the epoch format that I desire. Is there a way to retrieve the time’s in epoch format using node-influx?

Thanks! Nolan

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
BradfordMedeiroscommented, Nov 16, 2017

@brainsea Great library super awesome. This is the influx library people are coming to as the default node library for influx. Great job.

With that, I don’t understand why you’re transforming the result via the grammar file. To me it seems like you’re needlessly transforming the data. The way the code is written, it seems like it would make sense to potentially pass a custom data conversion function, but converting the raw result to a iso date object seems very peculiar.

Great job guys, super great job. Very great. But would you guys be open to passing the raw epoch result forward instead of adding the extra layer of translation? Would also be faster for bigger queries. Pretty sure most people are coming to this library and asking themselves why they’re time data isn’t matching the influxdb form.

0reactions
bencevanscommented, Jul 15, 2019

PR welcome 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

How can I get a formatted date for a UNIX timestamp from the ...
I have not tested on any other BSD systems. Pass the epoch time as an argument to this function and it will print...
Read more >
How to print epoch-formatted InfluxDB timestamps in ...
I just found the answer, in the official documentation: Note: Setting the precision to rfc3339 (-precision rfc3339) works with the -execute ...
Read more >
Default Vector timestamp output format is incompatible with ...
Default Vector output timestamp format is expected to be compatible with default Clickhouse timestamp input format.
Read more >
Please don't call it Epoch Time - Code of Matt
I have an epoch time and I want to get the next day's epoch time. Or even better: ... Unix timestamps do not...
Read more >
RFC 3339: Date and Time on the Internet: Timestamps
Abstract This document defines a date and time format for use in Internet ... Timestamp This term is used in this document to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found