Skip to content
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

Obsolete UnixTimestampExtensions methods #2121

Merged
merged 1 commit into from
Mar 3, 2020

Conversation

0xced
Copy link
Contributor

@0xced 0xced commented Mar 3, 2020

* The equivalent of `public static DateTimeOffset FromUnixTime(this long unixTime)` exists in the framework since .NET Framework 4.6: https://docs.microsoft.com/en-us/dotnet/api/system.datetimeoffset.fromunixtimeseconds
* The equivalent of `public static long ToUnixTime(this DateTimeOffset date)` exists in the framework since .NET Framework 4.6: https://docs.microsoft.com/en-us/dotnet/api/system.datetimeoffset.tounixtimeseconds
@codecov
Copy link

codecov bot commented Mar 3, 2020

Codecov Report

Merging #2121 into master will decrease coverage by 0.01%.
The diff coverage is 37.5%.

@@            Coverage Diff             @@
##           master    #2121      +/-   ##
==========================================
- Coverage   66.98%   66.96%   -0.02%     
==========================================
  Files         542      542              
  Lines       14239    14238       -1     
==========================================
- Hits         9538     9535       -3     
- Misses       4701     4703       +2
Impacted Files Coverage Δ
Octokit/Helpers/UnixTimeStampExtensions.cs 0% <0%> (-100%) ⬇️
Octokit/Models/Response/WeeklyHash.cs 0% <0%> (ø) ⬆️
Octokit/Models/Response/WeeklyCommitActivity.cs 64.28% <0%> (ø) ⬆️
Octokit/Http/RateLimit.cs 97.5% <100%> (ø) ⬆️
Octokit/Models/Response/AdditionsAndDeletions.cs 52.63% <100%> (ø) ⬆️
Octokit/SimpleJson.cs 70.15% <50%> (ø) ⬆️

Copy link
Member

@shiftkey shiftkey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A great bit of cleanup - thanks @0xced!

@shiftkey shiftkey merged commit c94cd05 into octokit:master Mar 3, 2020
@0xced 0xced deleted the Oobsolete-UnixTimestampExtensions branch March 3, 2020 13:30
@shiftkey
Copy link
Member

shiftkey commented Mar 3, 2020

advisories: The UnixTimestampExtensions.ToUnixTime methods are marked obsolete because there are equivalent APIs available in .NET Framework 4.6. As these are also intended for internal usage in .NET and should not be imported into the library code, these will be removed in a later update.

@shiftkey
Copy link
Member

shiftkey commented Mar 3, 2020

release_notes: Replaced old UnixTimestampExtensions.ToUnixTime extension methods with inbuild equivalents now that we target .NET Framework 4.6

@nickfloyd nickfloyd added Type: Maintenance Any dependency, housekeeping, and clean up Issue or PR and removed category: housekeeping labels Oct 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Maintenance Any dependency, housekeeping, and clean up Issue or PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants