Skip to content
Browse files

Merge pull request #5 from talko/master

Use os:timestamp instead of erlang:now for link expiration
  • Loading branch information...
2 parents 43cf414 + ec99474 commit 236b02e1d6f20bac8c284c6978459f448c47b2ed @gleber gleber committed May 24, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/erlcloud_s3.erl
View
2 src/erlcloud_s3.erl
@@ -581,7 +581,7 @@ make_link(Expire_time, BucketName, Key)
make_link(Expire_time, BucketName, Key, Config)
when is_integer(Expire_time), is_list(BucketName), is_list(Key) ->
- {Mega, Sec, _Micro} = erlang:now(),
+ {Mega, Sec, _Micro} = os:timestamp(),
Datetime = (Mega * 1000000) + Sec,
Expires = integer_to_list(Expire_time + Datetime),
To_sign = lists:flatten(["GET\n\n\n", Expires, "\n/", BucketName, "/", Key]),

0 comments on commit 236b02e

Please sign in to comment.
Something went wrong with that request. Please try again.