Download & Extend

User and node "created" dates (from feeds_to_unixtime()) default to the wrong timezone

Project:Feeds
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

If you import a node or user and don't have the "created" date as one of the fields, Feeds will create a default timestamp for this field that is incorrect (basically it seems to assume your local timezone is UTC).

This is closely related to the following issues:
#722740: Feeds Date mapper converts imported dates to GMT unless in UNIX timestamp format
#857216: Behavior on importing empty/NULL/invalid dates

However, it wouldn't be fixed by the patches in either of them. The solution, in any case, should be simple; the code already tries to fall back on REQUEST_TIME in the case where no created date is provided, but feeds_to_unixtime() doesn't let that happen because it attempts to convert a string to a date even when the string is empty.

Comments

#1

Status:active» needs review

Here is a patch.

AttachmentSizeStatusTest resultOperations
feeds-empty-created-date-1728634-1.patch438 bytesIgnored: Check issue status.NoneNone

#2

Version:7.x-2.x-dev» 6.x-1.x-dev
Status:needs review» patch (to be ported)

Date stuff is a mess, but this seems straight-forward.

7.x
http://drupalcode.org/project/feeds.git/commit/3bd7343

#3

Status:patch (to be ported)» fixed

huh, feeds_to_unix_time() does not exist in 6.x

#4

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

nobody click here