Created
October 27, 2019 05:53
-
-
Save bishawjit-das/278925f2ffc5160a4ae6127719452114 to your computer and use it in GitHub Desktop.
php to solr date convert
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $to = date('Y-m-d H:i:s'); | |
| $from = date('Y-m-d H:i:s', strtotime('-24 hours', strtotime($to))); | |
| $from = gmdate('Y-m-d\TH:i:s\Z', strtotime($from)); | |
| $to = gmdate('Y-m-d\TH:i:s\Z', strtotime($to)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment