Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

strptime doesn't parse date with miliseconds #43

Open
pyjsorg opened this Issue · 1 comment

1 participant

@pyjsorg
Owner
  • What steps will reproduce the problem?
  • _placed = datetime.strptime(_placed,"%Y-%m-%d %H:%M:%S.%f"), where _placed is '2012-01-31 13:33:43.874141'

in pyjs compiled code with --debug, in Firefox 9.0.1

  • What is the expected output?

I would expect _placed to be datetime(2012,1,31,13,33,43) object

  • What do you see instead?

In firebug console, under debug info

ValueError: Invalid or unsupported values for strptime: '2012-01-31 13:33:43.874141', '%Y-%m-%d %H:%M:%S.%f' Traceback: pyjslib.py, line 22 gwt.HTTPRequest.py, line 50: raise RuntimeError("Invalid call to asyncPut: handler is not a valid request handler") gwt.JSONService.py, line 224: self.request.handler.onRemoteResponse(response["result"], orders.py, line 49: _placed = datetime.strptime(_placed,"%Y-%m-%d %H:%M:%S.%f") datetime.py, line 223: return self.fromtimestamp(_strptime(datestring, format)) time.py, line 335: raise ValueError("Invalid or unsupported values for strptime: '%s', '%s'" % (datestring, format))

Original issue: http://code.google.com/p/pyjamas/issues/detail?id=680 (January 31, 2012 22:05:43)

@pyjsorg
Owner

From luke.lei...@gmail.com on February 04, 2012 22:32:55:
can you please create a unit test which shows this? add it to LibTest and raise
an exception which has "bug #680" in it, and then submit it as a patch (attachment) here?
many thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.