Skip to content
This repository has been archived by the owner on Apr 24, 2024. It is now read-only.

Timestamp is parsed wrongly if set #29

Closed
b-dur opened this issue Sep 7, 2015 · 1 comment
Closed

Timestamp is parsed wrongly if set #29

b-dur opened this issue Sep 7, 2015 · 1 comment

Comments

@b-dur
Copy link
Contributor

b-dur commented Sep 7, 2015

We experienced some events created on Thursday Sep. 3'rd that they where timestamped as March 9'th.

The error is due to bad formatted datetime sent by BaseAction.cs

If Timestamp is set it will send the data as Timestamp.ToString() instead of .ToString("o") as when it has not been set.

if (options.Timestamp.HasValue)
                this.Timestamp = options.Timestamp.ToString ();
            else
                this.Timestamp = DateTime.Now.ToString("o");

https://github.com/segmentio/Analytics.NET/blob/master/Analytics/Model/BaseAction.cs#L39

@b-dur
Copy link
Contributor Author

b-dur commented Sep 7, 2015

Maybe the DateTime.Now.ToString("o"); actually should be DateTime.UtcNow.ToString("o"); as well.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant