Project:Salesforce Suite
Version:6.x-2.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

We were having a problem with the formatting differences between Salesforce date fields and cck datetime fields. This patch helped us reconcile the differences.

AttachmentSize
sf_node.patch1.55 KB

Comments

#1

Status:needs review» needs work

I haven't tried this patch yet.
Looking at the code, however, you have two instances of an undefined / out of scope variable:

+  $data = $source->$field;
+  $return = date($date_format, $unix_timestamp);

+  $data = $node->$key;
+  $formated_date = date($date_format, $unix_timestamp);

Where does $unix_timestamp get defined?
Seems like you're missing a line in between each of those...

Also, taking an example from sf_node_export, I think you can use gmdate(DATE_ATOM, $timestamp); and save about 3 lines.

#2

Did this ever get resolved?

#3

Status:needs work» fixed

yes, this is addressed in the new sf_contrib module in this package (latest dev)

#4

Status:fixed» closed (fixed)

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