Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?
- $date = date_create_from_format("D, d M Y H:i:s O", "Tue, 20 Mar 2018 01:38:22 GMT");
- echo date_format($date, 'Y-m-d');
- //result 2018-03-20
- $date = date_create_from_format("D, d M Y H:i:s O", "Tue, 21 Mar 2018 01:38:22 GMT");
- echo date_format($date, 'Y-m-d');
- //result 2018-03-27 почему 27 марта?
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement