Skip to content
This repository was archived by the owner on May 30, 2019. It is now read-only.
This repository was archived by the owner on May 30, 2019. It is now read-only.

Send-GraphiteMetric does not work with -DateTime #59

@SteveLowe

Description

@SteveLowe

The conversion from DateTime to Unix time is broken

>Send-GraphiteMetric -CarbonServer 127.0.0.1 -MetricPath 'test' -MetricValue 123 -DateTime (Get-Date)
Send-GraphiteMetric : Cannot convert value "24/05/2016 09:38:46" to type "System.UInt64". Error: "Invalid cast from
'DateTime' to 'UInt64'."
At line:1 char:1
+ Send-GraphiteMetric -CarbonServer 127.0.0.1 -MetricPath 'test' -Metri ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [Send-GraphiteMetric], RuntimeException
    + FullyQualifiedErrorId : InvalidCastIConvertible,Send-GraphiteMetric

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions