The timestamp is incorrect because only the date is stored -
strtotime(date('Y-m-d', $reminder->from_date)

Comments

mralexho’s picture

Status: Active » Patch (to be ported)
StatusFileSize
new3.16 KB

I've updated the code to include the hour, minutes, and seconds into offset -
strtotime(date('Y-m-d H:i:s', $reminder->from_date)

Attached patch.

Thanks,
Alex

mralexho’s picture

StatusFileSize
new1.21 KB

Sorry, my previous patch contained extra line insertions because Sublime stripped whitespaces and converted tabs into spaces.

Please use the clean attached patch instead.

Thanks,
Alex

fizk’s picture

fizk’s picture

Title: The time offset does not work! » The time offset does not work

Status: Fixed » Closed (fixed)

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

Alpinist1974’s picture

Version: 7.x-1.1 » 7.x-1.2

Hi,

I'm reopening this issue because the module is not working for me. The time offset is not computed. No matter what I enter, the message is sent as soon as cron runs next.

I tried uninstalling and using 7.x-1.1, but no luck with that either. Is there some other configuration option I'm missing here? I hate to be clueless, but in the absence of documentation or even a readme, there's not much I can draw on.

The concept of the module is great, and less clunky than date reminder, but I just can't get it to work.

Any help greatly appreciated!

Thanks,

Matt

mralexho’s picture

Hi Alpinist1974,

Can you post some more information on the offset error? Are you able to see your timestamp in the node_reminder table? Is your timezone settings set in PHP?

Thanks,
Alex
@mralexho

Alpinist1974’s picture

Hi Alex,

The node_reminder table is saving the timestamp. The PHP settings--in the php.ini--are set to date.timezone = UTC. These are also configured in my Drupal installation.

Thanks,

Matt

mralexho’s picture

Status: Closed (fixed) » Needs work

Thanks Matt, I'm getting the same error as well.

You can temporarily use the 7.x-1.1 branch and checkout commit 6cf1b4f. I'm running this version on a production site so I know it's working.

*note, the Reminder option does not yet

I'll need to review the code from fizk and see if I can patch the issue.

Alex

Alpinist1974’s picture

Thanks, Alex,

I'll check out the patch.

Matt

mralexho’s picture

Status: Needs work » Patch (to be ported)
StatusFileSize
new5.56 KB

Hi Matt and Yonas,

Please see my attached patch. There was a typo with the reminder object, reminder_on changed to reminder_enabled according to your schema.

I hope you don't mind, I also reordered the $reminder class to match the install file.

Thanks,
Alex

fizk’s picture

Issue summary: View changes
Status: Patch (to be ported) » Fixed

Status: Fixed » Closed (fixed)

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