Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions Qiniu/RS/PutPolicy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,8 @@ public UInt64 Expires {
public PutPolicy (string scope, UInt32 expires=3600)
{
Scope = scope;
DateTime begin = new DateTime (1970, 1, 1);
DateTime now = DateTime.Now;
TimeSpan interval = new TimeSpan (now.Ticks - begin.Ticks);
Expires = (UInt32)interval.TotalSeconds + expires;
UInt32 deadline = (UInt32)((DateTime.Now.ToUniversalTime().Ticks - 621355968000000000) / 10000000 + expires);
Expires = deadline;
}

/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion Qiniu/RS/RSClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public enum FileHandle
/// </summary>
public class RSClient :QiniuAuthClient
{
private static string[] OPS = new string[] { "stat", "move", "copy", "delet" };
private static string[] OPS = new string[] { "stat", "move", "copy", "delete" };

public RSClient (Mac mac=null)
: base(mac)
Expand Down