Hi,
I am trying to Schedule ads and when I do Schedule them. I have problems with the timing. The time changes for the time I enter.
For example, when I enter " September 10, 2009 12:58 " for start time, the following shows up after I submit the ad.
"
Status
This advertisement has been approved and is currently waiting to be administratively activated.
This advertisement will be automatically activated on Friday, September 11, 2009 - 06:58, in 1 day 17 hours.
"
and it basically changes the time and doesn't stay the time I specify.
What can I do about it? Thanks
Comments
Comment #1
oibmatdm commentedI'm having a ad scheduling problem too.
I set an autoexpiry date and time but it didn't expire on the set date.
Now when I try to set the date to September 10, 2009 06:45 it saves it as September 10, 2009 11:45 (adds 5 hours).
Anybody?
Thanks
Comment #2
jeremy commentedThe latest release includes allows you to schedule ads with Javascript popups. I recommend you upgrade to Drupal 6 and try again.
Comment #4
mr.j commentedI am re-opening this because I am using 6.x-2.4 and I don't see a javascript popup and the exact same thing is happening.
I think that the problem is that the node uses format_date() without specifying a timezone to display the date when loading the form. This converts whatever timestamp is stored in the database to the user's local time. However it uses strtotime to parse and save the date when the form is submitted which will save the date in the server's default timezone.
So you get problems like this:
- Edit ad node.
- Set auto-activate date to June 1, 2013 00:00 and save.
- On the node display page it displays the date as June 1, 2013 14:00 due to my local timezone being 14 hours ahead of the server's.
- Edit the ad node again.
- The form displays the auto-activate date as June 1, 2013 14:00 now.
- Save the node again.
- The node display page now displays the date as June 2, 2013 04:00.
So the date increments by the difference between the user's local timezone and the server timezone every time the node is saved, even if you don't change the date.
Comment #5
lrwebks commentedDrupal 6 is EOL and no longer supported. Closing this as outdated for that reason. Thanks for your contribution!