Forums
Forums / Plugin: WP All Export – Drag & Drop Export to Any Custom CSV, XML & Excel / Issue export date/time
(@rafasantos)
5 years, 11 months ago
I’m trying to export the post time, but it’s being exported with the wrong time. Exports 4:00 and should be 1:00.
Could you help me please?
(@wpallimport)
Hi @rafasantos
This is likely because WP All Export exports the GMT date by default. Please try using the following function on the “ID” field to get the local post_date field:
function my_get_date( $id ) { if ( $post = get_post( $id ) ) { return date( 'Y-m-d h:i:s', strtotime( $post->post_date ) ); } }
Learn more here: https://www.wpallimport.com/documentation/export/pass-data-through-php-functions/.
Let me know how it goes.
Perfect! Thanks a lot for your help. 🙂
The topic ‘Issue export date/time’ is closed to new replies.