Skip to content

Saving DateTime object to database is not possible to read back out #110

Open
@kjetilgloppen

Description

@kjetilgloppen

This is more of a design decision question..
I see that if you have a field value of type DateTime it will be saved to Influx as a number (Epoch). Obviously because Influx does not support DateTime data objects.

But if I read these measurements back, there is no way for this library to convert it back to a DateTime.

So what's the reasoning behind the decision to convert it to a number/Epoch?

It seams a bit useless and perhaps wrong IMHO.
Perhaps the user should do the conversion himself instead of the library making this decision. Then we can decide to use Epoch, another number, or perhaps a string... At least then you have the knowledge to convert it back to the original type.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions