Skip to content

Fix timestamp implementation for microseconds#94

Merged
nd4p90x merged 4 commits intosegmentio:masterfrom
alexleutgoeb:patch-1
Feb 2, 2021
Merged

Fix timestamp implementation for microseconds#94
nd4p90x merged 4 commits intosegmentio:masterfrom
alexleutgoeb:patch-1

Conversation

@alexleutgoeb
Copy link
Contributor

Following changes and fixed issues are included:

  • Line 134: Wrong php method reference
  • Line 162: The cast to int is redundant as seconds are already casted in date() call at line 165
  • Line 163: Casting microseconds part to int strips out leading zeros, resulting in converting a timestamp from 1504784759.0124 to 1504784759.124 e.g.
  • Line 614: The date format string misses the dot as separator between seconds and microseconds, resulting in datetime object far in the future when parsing in send.php (File consumer)

Following changes and fixed issues are included:

- Line 134: Wrong php method reference
- Line 162: The cast to int is redundant as seconds are already casted in date() call at line 165
- Line 163: Casting microseconds part to int strips out leading zeros, resulting in converting a timestamp from `1504784759.0124` to `1504784759.124` as an example.
- Line 614: The date format string misses the dot as separator between seconds and microseconds, resulting in datetime object far in the future when parsing in `send.php` (File consumer)
@f2prateek
Copy link
Contributor

Tracking internally in JIRA as well https://segment.atlassian.net/browse/LIB-140

@nd4p90x nd4p90x merged commit dd83d1b into segmentio:master Feb 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants