views:

487

answers:

2

I'm looking at the Paypal IPN docs, and it says the datetime stamps of their strings are formatted as:

HH:MM:SS DD Mmm YY, YYYY PST

So year is specified twice? Once in double digits, and another with 4 digits? This looks bizarre.

+3  A: 

This seems to be a bug in the documentation. The actual format should be "HH:MM:SS Mmm DD, YYYY PST" (example)

dseifert
+1. However, the real format still causes problems with common parsing libraries (e.g. http://rhnh.net/2008/03/17/paypal-ipn-fails-date-standards). ISO 8601 exists for a reason...
Matthew Flaschen
Perfect, thank you!
MTsoul
A: 

Hi, this is the correct format according to their documentation - 2010-03-27T12:34:49Z so it is - YYYY-MM-DDTHH:MM:SSZ (I don't know what the T in the middle and Z is but it's constant for all the dates) I've created PayPal NVP library in Java, so if you want to check how it works, or use it, you are more than welcome. it's on sourceforge - payapal-nvp.sourceforge.net

pete