Browse code

* S3/S3.py: modify 'x-amz-date' format (problems reported on MacOS X). Thanks Jon Larkowski for fix.

git-svn-id: https://s3tools.svn.sourceforge.net/svnroot/s3tools/s3cmd/trunk@166 830e0280-6d2a-0410-9c65-932aecc39d9d

Michal Ludvig authored on 2008/02/27 19:57:11
Showing 2 changed files
... ...
@@ -5,6 +5,8 @@
5 5
 	* s3cmd: Fix crash when 'sync'ing files with unresolvable owner uid/gid.
6 6
 	* S3/S3.py, S3/Utils.py: open files in binary mode (otherwise windows
7 7
 	  users have problems).
8
+	* S3/S3.py: modify 'x-amz-date' format (problems reported on MacOS X). 
9
+	  Thanks Jon Larkowski for fix.
8 10
 
9 11
 2008-02-27  Michal Ludvig  <michal@logix.cz>
10 12
 
... ...
@@ -317,7 +317,7 @@ class S3(object):
317 317
 			del(headers["date"])
318 318
 		
319 319
 		if not headers.has_key("x-amz-date"):
320
-			headers["x-amz-date"] = time.strftime("%a, %d %b %Y %H:%M:%S %z", time.gmtime(time.time()))
320
+			headers["x-amz-date"] = time.strftime("%a, %d %b %Y %H:%M:%S +0000", time.gmtime())
321 321
 
322 322
 		method_string = S3.http_methods.getkey(S3.operations[operation] & S3.http_methods["MASK"])
323 323
 		signature = self.sign_headers(method_string, resource, headers)