Skip to content

Use built in way to calculate unix time #364

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

Closed

Conversation

JeremyMahieu
Copy link

Slightest imporvement possible but it saves a line and uses a standard way to convert it. Available in all the standards since Framework 4.6

@sandersaares
Copy link
Member

There is, in fact, a good reason ToUnixTimeSeconds() is not used - it loses the fractional part of the seconds! However, you are right that this can be simplified - we have Gauge.SetToTimeUtc() for exactly this purpose. I have manually merged the appropriate change - thank you for taking a poke at this!

@JeremyMahieu
Copy link
Author

well done, looks better than my suggestion

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.

2 participants