1
Hello.
I am creating a payment system via pagseguro, where this system is not letting create billets, because it claims the date.
I know the date in style 2020-05-30T21:52:49.000-04:00
works, but date('Y-m-dH:i:s.uZ', strtotime($data. '+ 3 days'));
How to generate date in this model that I said works?
That way you keep making the same mistake
– gabrielfalieri
Try it this way then:
date('c', strtotime($data. '+ 3 days'));
. Thus, the date would be in the ISO 8601 standard, the same one that the pagseguro uses. If it works, let me know so I can edit the answer in a more complete way.– Lucas Pace
worked not: 2020-05-29T21:29:06-03:00 mine was generated and 2020-05-30T21:52:49,000-04:00 and the one that works, missing milliseconds seems
– gabrielfalieri
Actually, from what I’m reading about, this PHP format is not exactly the same as iso. Try
Y-m-d\TH:i:s.uP
– Lucas Pace
tb n kkkkkkk, I’m not sure how the mercadopago wants me to send this date
– gabrielfalieri
tries Y-m-d TH:i:s. Vp whereas the documentation I Linkei is wrong/outdated and it is mandatory to time zone. Thus, the output is exactly equal to 2020-05-30T21:52:49,000-04:00
– Lucas Pace
good, worked, abigo
– gabrielfalieri
gloria, later I edit the original reply with more details
– Lucas Pace