Skip to content

Commit

Permalink
Replace primary usages
Browse files Browse the repository at this point in the history
  • Loading branch information
bording committed Apr 18, 2018
1 parent 7062b0a commit faffe4a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion LibGit2Sharp/Core/Proxy.cs
Expand Up @@ -2793,7 +2793,7 @@ public static unsafe SignatureHandle git_signature_new(string name, string email
{
git_signature* ptr;

int res = NativeMethods.git_signature_new(out ptr, name, email, when.ToSecondsSinceEpoch(),
int res = NativeMethods.git_signature_new(out ptr, name, email, when.ToUnixTimeSeconds(),
(int)when.Offset.TotalMinutes);
Ensure.ZeroResult(res);

Expand Down
2 changes: 1 addition & 1 deletion LibGit2Sharp/Core/TarWriter.cs
Expand Up @@ -332,7 +332,7 @@ private class UsTarHeader

this.mode = Convert.ToString(mode, 8).PadLeft(7, '0');
this.size = size;
unixTime = Convert.ToString(lastModificationTime.ToSecondsSinceEpoch(), 8).PadLeft(11, '0');
unixTime = Convert.ToString(lastModificationTime.ToUnixTimeSeconds(), 8).PadLeft(11, '0');
this.userId = userId.PadLeft(7, '0');
this.groupId = userId.PadLeft(7, '0');
this.userName = userName;
Expand Down
2 changes: 1 addition & 1 deletion LibGit2Sharp/Signature.cs
Expand Up @@ -21,7 +21,7 @@ internal unsafe Signature(git_signature* sig)
{
name = LaxUtf8Marshaler.FromNative(sig->name);
email = LaxUtf8Marshaler.FromNative(sig->email);
when = Epoch.ToDateTimeOffset(sig->when.time, sig->when.offset);
when = DateTimeOffset.FromUnixTimeSeconds(sig->when.time).ToOffset(TimeSpan.FromMinutes(sig->when.offset));
}

/// <summary>
Expand Down

0 comments on commit faffe4a

Please sign in to comment.