From e3d33538d475b8f9e98f4a51e58eed06d17dd5cd Mon Sep 17 00:00:00 2001 From: Ryan Bigg Date: Wed, 5 Oct 2016 12:15:13 +1100 Subject: [PATCH] Use Timex.DateTime.now, rather than Timex.DateTime.today This uses the current time, rather than the beginning of the day --- lib/aws_auth.ex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/aws_auth.ex b/lib/aws_auth.ex index 32f6477..f504def 100644 --- a/lib/aws_auth.ex +++ b/lib/aws_auth.ex @@ -29,7 +29,7 @@ defmodule AWSAuth do end def sign_url(access_key, secret_key, http_method, url, region, service, headers) do - sign_url(access_key, secret_key, http_method, url, region, service, headers, Timex.DateTime.today) + sign_url(access_key, secret_key, http_method, url, region, service, headers, Timex.DateTime.now) end def sign_url(access_key, secret_key, http_method, url, region, service, headers, request_time) do @@ -74,7 +74,7 @@ defmodule AWSAuth do end def sign_authorization_header(access_key, secret_key, http_method, url, region, service, headers, payload) do - sign_authorization_header(access_key, secret_key, http_method, url, region, service, headers, payload, Timex.DateTime.today) + sign_authorization_header(access_key, secret_key, http_method, url, region, service, headers, payload, Timex.DateTime.now) end def sign_authorization_header(access_key, secret_key, http_method, url, region, service, headers, payload, request_time) do