[wp-trac] [WordPress Trac] #49413: wp_exif_date2ts should use Dateatime and accept an optional offset

WordPress Trac noreply at wordpress.org
Wed Feb 12 07:57:33 UTC 2020


#49413: wp_exif_date2ts should use Dateatime and accept an optional offset
--------------------------+-----------------------------
 Reporter:  dshanske      |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  low           |  Milestone:  Awaiting Review
Component:  Date/Time     |    Version:
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 I think this falls under the date/time component. This function should be
 updated to use DateTime and to accept an optional timezone offset.

 Right now, this is called by wp_read_image_metadata with the result the
 timestamp is wrong. This is because timestamps in exif are stored without
 timezone offsets, usually in local time. Storing it as a timestamp was
 therefore a mistake in my opinion as it will always be off. We should be
 assuming that the time is local site time unless an optional
 offset/timezone string is passed in.

 Separately, as newer cameras and most cell phones do store that offset,
 will be proposing changes for that in a separate ticket.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/49413>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list