Skip to content

Fix RFC 3339 date handling #34

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 24, 2016
Merged

Fix RFC 3339 date handling #34

merged 2 commits into from
Dec 24, 2016

Conversation

rcrichton
Copy link
Contributor

Glossy was mixing a time offset with UTC dates when producing syslog messages. This change fixes this so that time offsets are used properly.

Original discussion around this can be found here: #33

Glossy was mixing a time offset with UTC dates when producing syslog
messages. This change fixes this so that time offsets are used properly.

Original discussion around this can be found here:
squeeks#33
@rcrichton
Copy link
Contributor Author

@squeeks how does this look to you?

@myndzi
Copy link

myndzi commented Feb 26, 2016

I'd like to see this merged so I can stop depending on a git repo fork.

For some reason this branch seems to produce significantly greater variance in my test suite. The difference between the date extracted from the message and a new date object is consistently 200-700ms, where before I gave it a range of 0-10 ms. A brief test of just producing messages seems to go the other way, however: straight up calls to .produce were much faster with this branch. Not sure what it's all about and I haven't had to wrap my head around this code for months, just thought it was worth mentioning.

Edit: maybe it's to do with parsing differences between the Z format and a timestamped format. Still seems like a HUGE difference.

@myndzi
Copy link

myndzi commented Feb 26, 2016

Ahh. The obvious answer: timestamps produced this way do not include milliseconds. And that's the answer to my old question of "Why new Date(Date())". Not a problem with this PR, but possibly a problem with Glossy. Will open a separate issue.

@rcrichton
Copy link
Contributor Author

@myndzi thanks for reminding me that this PR is still open.

@squeeks any chance we could get this merged in now?

@sebastianhaas
Copy link

@squeeks could you merge this?

@squeeks squeeks merged commit 487cbca into squeeks:master Dec 24, 2016
mikehu pushed a commit to logdna/glossy that referenced this pull request Jan 11, 2017
Glossy was mixing a time offset with UTC dates when producing syslog
messages. This change fixes this so that time offsets are used properly.

Original discussion around this can be found here:
squeeks#33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants