[IronPython] S3, boto, and strftime with %X

Sanghyeon Seo sanxiyn at gmail.com
Mon Oct 16 14:41:57 CEST 2006

S3 is Amazon's Simple Storage Service.

boto is a Python interface to Amazon Web Services, available here:

boto has a bug. boto uses strftime with %X format string to generate
Date header, but Python Library Reference doesn't guarantee any such
thing for %X. It only says:

%X Locale's appropriate time representation.

Fix: replace %X with %H:%M:%S.

On the other hand, IronPython behaves differently in this case,
causing an incompatibility. Locale was POSIX. I think this should be

IronPython 1.0 (1.0.61005.1977) on .NET 2.0.50727.42
Copyright (c) Microsoft Corporation. All rights reserved.
>>> import time
>>> time.strftime('%X')

Python 2.4.4c0 (#2, Oct  2 2006, 00:57:46)
[GCC 4.1.2 20060928 (prerelease) (Debian 4.1.1-15)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import time
>>> time.strftime('%X')

Seo Sanghyeon

More information about the Ironpython-users mailing list