-1

I am trying to parse what I believe to be a UTC date, my PHP code seems to output

/Date(1392233400000+0000)/

which I can't seem to find any way of turning into a date and time.

RouthMedia
  • 401
  • 1
  • 4
  • 17

1 Answers1

0

Your API is offering you the information in two ways. As JSON objects or XML. Your example is from the JSON part. See this question on how to correctly parse it with PHP.

Looks like that in the XML form the date is already in the "usual" UTC format. So You could also parse the XML data if you prefer.

Community
  • 1
  • 1
sigy
  • 2,408
  • 1
  • 24
  • 55
  • Im not sure how to parse it as xml, something i need to look into. Thanks anyway. the other thread does the trick – RouthMedia Feb 12 '14 at 21:06