<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"Segoe UI";
        panose-1:2 11 5 2 4 2 4 2 2 3;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.gmailquote
        {mso-style-name:gmail_quote;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=EN-US link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Sorry for the delay &#8211; it was a really long weekend for many of
us.<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Currently our strptime implementation is mostly built by
translating from Python formatting codes to .NET formatting codes and then
calling the .NET Formatting APIs.&nbsp; There&#8217;s apparently a difference here in that
.NET doesn&#8217;t allow random extra characters in its formatting strings, and
CPython does.&nbsp; <o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>I&#8217;ve opened a bug on CodePlex (#776, <a
href="http://www.codeplex.com/WorkItem/View.aspx?ProjectName=IronPython&amp;WorkItemId=776">http://www.codeplex.com/WorkItem/View.aspx?ProjectName=IronPython&amp;WorkItemId=776</a>)
to track this.&nbsp; We&#8217;ll try and get to this for 1.0 but I&#8217;m not entirely sure we&#8217;ll
be able to get it done in time.<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<div style='border:none;border-top:solid #91C0FF 1.0pt;padding:3.0pt 0in 0in 0in'>

<p class=MsoNormal><b><span style='font-size:9.0pt;font-family:"Segoe UI","sans-serif"'>From:</span></b><span
style='font-size:9.0pt;font-family:"Segoe UI","sans-serif"'>
users-bounces@lists.ironpython.com [mailto:users-bounces@lists.ironpython.com] <b>On
Behalf Of </b>Mike Raath<br>
<b>Sent:</b> Tuesday, July 04, 2006 10:23 AM<br>
<b>To:</b> users@lists.ironpython.com<br>
<b>Subject:</b> Re: [IronPython] Bug in time.strptime?<o:p></o:p></span></p>

</div>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal style='margin-bottom:12.0pt'>Just wondering if this post
slipped in under the radar - can anyone please confirm whether this is a bug,
or if I could be using IronPython differently to achieve the same thing?<br>
<br>
I need to be able to interpret non-standard dates (the format of which I can't
dictate) and in CPython this is possible using the code below. <br>
<br>
Thanks,<br>
Mike<o:p></o:p></p>

<div>

<blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;
margin-left:4.8pt;margin-right:0in'>

<div>

<p class=MsoNormal>I'm getting an exception in IronPython which I don't get in
CPython. <br>
<br>
>From the CPython console window:<br>
<br>
&gt;&gt;&gt; import time, datetime<br>
&gt;&gt;&gt; d = time.strptime(&quot;July 3, 2006 At 0724 GMT&quot;, &quot;%B
%d, %Y At %H%M GMT&quot;) <br>
&gt;&gt;&gt; print d<br>
(2006, 7, 3, 7, 24, 0, 0, 184, -1)<br>
<br>
<br>
>From IronPython, a similar set of statements:<br>
<br>
engine.Execute(&quot;import datetime&quot;)<br>
engine.Execute(&quot;d = time.strptime(&quot;&quot;July 3, 2006 At 0724
GMT&quot;&quot;, &quot;&quot;%B %d, %Y At %H%M GMT&quot;&quot;)&quot;) <br>
<br>
results in this exception:<br>
The string was not recognized as a valid DateTime. There is a unknown word
starting at index 13.<br>
<br>
<br>
<br>
The word starting at index 13 is the &quot;At&quot; but the format string
provided should tell strptime how to interpret it. <o:p></o:p></p>

</div>

</blockquote>

</div>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

</div>

</body>

</html>