MinnPost/object-sync-for-salesforce

Check all stored datetimes for timezones

jonathanstegall opened this issue · 2 comments

Is your feature request related to a problem? Please describe.
I think it would be nice if all datetime values were stored in the database as UTC and then converted to local, but I don't think that is actually what happens.

To verify this:

  1. Set up the plugin in WordPress with a default (UTC) timezone. Turn on debug mode.
  2. Run Salesforce sync tasks
  3. Change the timezone to something local, ex Chicago.
  4. Try to run the same Salesforce sync tasks. For example a manual user push/pull from the user profile.
  5. See a log entry: "Notice: : Did not sync WordPress user with ID of whatever with Salesforce Id whatever because the last sync timestamp was greater than the object updated timestamp."
  6. Switch it back to UTC and repeat. Nothing prevents it from happening.

Describe the solution you'd like
I think it would be nice if all datetime values were stored in the database as UTC and then converted to local.

I'm not really sure what the backward compatibility of this would be. It would be nice if it didn't break anything, but that will need testing.