Title: Wrong meta data imported and wrong sorting
Last modified: August 20, 2016

---

# Wrong meta data imported and wrong sorting

 *  Resolved [mummihuhn](https://wordpress.org/support/users/mummihuhn/)
 * (@mummihuhn)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/wrong-meta-data-imported-and-wrong-sorting/)
 * Hi.
 * Since the latest version of nextgen-gallery 1.912 the thumbnails are not in the
   right order.
 * The date which has been imported ist 1.jan 1970 for every picture.
 * does anybody know how to fix this problem?
 * cheers
 * Ralph
 * [http://wordpress.org/extend/plugins/nextgen-gallery/](http://wordpress.org/extend/plugins/nextgen-gallery/)

Viewing 15 replies - 1 through 15 (of 49 total)

1 [2](https://wordpress.org/support/topic/wrong-meta-data-imported-and-wrong-sorting/page/2/?output_format=md)
[3](https://wordpress.org/support/topic/wrong-meta-data-imported-and-wrong-sorting/page/3/?output_format=md)
[4](https://wordpress.org/support/topic/wrong-meta-data-imported-and-wrong-sorting/page/4/?output_format=md)
[→](https://wordpress.org/support/topic/wrong-meta-data-imported-and-wrong-sorting/page/2/?output_format=md)

 *  [andybrownphotography](https://wordpress.org/support/users/andybrownphotography/)
 * (@andybrownphotography)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/wrong-meta-data-imported-and-wrong-sorting/#post-3475872)
 * I also have the same problem since updating to 1.9.12, it appears that older 
   images are having their dates changed and new ones are getting 1 Jan 1970 even
   though their metadata is correct. Any ideas anyone?
 * Regards,
 * Andy
 *  [lnichetti](https://wordpress.org/support/users/lnichetti/)
 * (@lnichetti)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/wrong-meta-data-imported-and-wrong-sorting/#post-3475882)
 * I also have the same problem since installing 1.9.12. Please fix this issue because
   I have 2 running sites depending on this plugin!
 *  [lnichetti](https://wordpress.org/support/users/lnichetti/)
 * (@lnichetti)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/wrong-meta-data-imported-and-wrong-sorting/#post-3475884)
 * I confirm what [andybrownphotography] said: pictures metadata seems to be imported
   correctly, but all images uploaded after upgrading nextGenGallery to 1.9.12 have
   the same date (1 Jan 1970), so the sorting by date does not work as expected
 *  [mauvan](https://wordpress.org/support/users/mauvan/)
 * (@mauvan)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/wrong-meta-data-imported-and-wrong-sorting/#post-3475887)
 * Same here. Seems to a problem since last update (or 1.9.11).
    I need it because
   images from different camera’s need to be sorted by date.
 *  [Simon](https://wordpress.org/support/users/sdellenb/)
 * (@sdellenb)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/wrong-meta-data-imported-and-wrong-sorting/#post-3475892)
 * I have the same problem. All photos imported with 1.9.10 have the correct date,
   all imported after the update to 1.9.12 appear as 1 Jan 1970, though the metadata
   shows the correct date.
 * Seems the conversion to Unix Timestamp ([http://www.unixtimestamp.com/index.php](http://www.unixtimestamp.com/index.php))
   goes wrong and the default value ends up in the database.
    **Edit**: Indeed, 
   the imagedate field in the ngg_pictures table is ‘1970-01-01 00:33:33’ for all
   new images..
 *  [Simon](https://wordpress.org/support/users/sdellenb/)
 * (@sdellenb)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/wrong-meta-data-imported-and-wrong-sorting/#post-3475893)
 * Update: I’ve replaced lib\meta.php with the one from 1.9.10 and it works fine
   again when importing images.
 * The function get_date_time() is not working for me anymore in 1.9.12.
 *  [mauvan](https://wordpress.org/support/users/mauvan/)
 * (@mauvan)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/wrong-meta-data-imported-and-wrong-sorting/#post-3475895)
 * [@simon](https://wordpress.org/support/users/simon/): so we have to re-import
   all images again (?)
    Hopefully there will be an update real soon.
 *  [Simon](https://wordpress.org/support/users/sdellenb/)
 * (@sdellenb)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/wrong-meta-data-imported-and-wrong-sorting/#post-3475911)
 * I’ve quickly looked through the code, and it may be enough to
    - Revert lib\meta.php to 1.9.10 state*
    - Check/Select the pictures that have invalid imagedate in the gallery
    - Pick ‘Import Metadata’ from the Combobox and execute it
 * I’ve not tested this (I manually updated the database..), but it looks like get_date_time()
   is called when doing this.
 * * If you don’t have an old copy of nggallery, the [internet’s long time memory has it](http://web.archive.org/web/20121227164340/http://wordpress.org/extend/plugins/nextgen-gallery/).
 *  Plugin Contributor [photocrati](https://wordpress.org/support/users/photocrati/)
 * (@photocrati)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/wrong-meta-data-imported-and-wrong-sorting/#post-3475915)
 * If you all wouldn’t mind submitting a [**bug report here**](http://www.nextgen-gallery.com/report-bug),
   it will go directly to our developers to look into. We’ll hopefully have a fix
   for this included in our next upgrade.
 * Thanks!
 *  [Simon](https://wordpress.org/support/users/sdellenb/)
 * (@sdellenb)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/wrong-meta-data-imported-and-wrong-sorting/#post-3475917)
 * Thanks for the link! Bug report is submitted.
 *  [andybrownphotography](https://wordpress.org/support/users/andybrownphotography/)
 * (@andybrownphotography)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/wrong-meta-data-imported-and-wrong-sorting/#post-3475919)
 * Bug report submitted, thanks
 *  Plugin Contributor [photocrati](https://wordpress.org/support/users/photocrati/)
 * (@photocrati)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/wrong-meta-data-imported-and-wrong-sorting/#post-3475927)
 * Thanks [@simon](https://wordpress.org/support/users/simon/) & [@andybrownphotography](https://wordpress.org/support/users/andybrownphotography/)
   🙂 Bug report received!
 *  [EdLeckert](https://wordpress.org/support/users/edleckert/)
 * (@edleckert)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/wrong-meta-data-imported-and-wrong-sorting/#post-3475940)
 * Looking forward to the fix. Hacking the db for every uploaded image is not fun.
   🙂
 *  Plugin Contributor [photocrati](https://wordpress.org/support/users/photocrati/)
 * (@photocrati)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/wrong-meta-data-imported-and-wrong-sorting/#post-3475942)
 * I am going to mark this thread as resolved, because we will be looking into resolving
   this in the next upgrade. Please continue to submit your bug reports if you haven’t
   already if you are experiencing this error.
 * Thanks!
 *  [markcorder](https://wordpress.org/support/users/markcorder/)
 * (@markcorder)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/wrong-meta-data-imported-and-wrong-sorting/#post-3475944)
 * I just submitted mine – same problem…
 * I’ll note that I just tried a fresh installation of WP 3.5.1 on a localhost setup–
   then installed NGG 1.9.12 only with NO other plugins installed or running – and
   the very same thing happened : After creating a Gallery, all photos added to 
   it get the date “January 1, 1970”.

Viewing 15 replies - 1 through 15 (of 49 total)

1 [2](https://wordpress.org/support/topic/wrong-meta-data-imported-and-wrong-sorting/page/2/?output_format=md)
[3](https://wordpress.org/support/topic/wrong-meta-data-imported-and-wrong-sorting/page/3/?output_format=md)
[4](https://wordpress.org/support/topic/wrong-meta-data-imported-and-wrong-sorting/page/4/?output_format=md)
[→](https://wordpress.org/support/topic/wrong-meta-data-imported-and-wrong-sorting/page/2/?output_format=md)

The topic ‘Wrong meta data imported and wrong sorting’ is closed to new replies.

 * ![](https://ps.w.org/nextgen-gallery/assets/icon-256x256.png?rev=2083961)
 * [Photo Gallery, Sliders, Proofing and Themes - NextGEN Gallery](https://wordpress.org/plugins/nextgen-gallery/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/nextgen-gallery/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/nextgen-gallery/)
 * [Active Topics](https://wordpress.org/support/plugin/nextgen-gallery/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/nextgen-gallery/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/nextgen-gallery/reviews/)

## Tags

 * [date](https://wordpress.org/support/topic-tag/date/)

 * 49 replies
 * 23 participants
 * Last reply from: [joant6](https://wordpress.org/support/users/joant6/)
 * Last activity: [12 years, 11 months ago](https://wordpress.org/support/topic/wrong-meta-data-imported-and-wrong-sorting/page/4/#post-3476133)
 * Status: resolved