[wp-hackers] wp_cron - odd behavior
Gaurav Aggarwal
gaurav91.2008 at gmail.com
Fri Feb 18 07:08:20 UTC 2011
You can use* current_time('mysql',get_option('gmt_offset'))* for getting
time according to your blog.
On Fri, Feb 18, 2011 at 12:29 PM, aditya sharma
<sharmaaditya333 at gmail.com>wrote:
> WordPress gets its time from the webserver that it is running on, which may
> not be the same as the MySQL server.
>
> In PHP, have them run this to see what the server time is:
> <?php echo gmdate('Y-m-d G:i:s'); ?>
>
> That should output the current time on the server in GMT, which is what the
> time on their server should be set to.
>
> WordPress uses that time plus whatever offset you give it to determine your
> "local" time.
>
> Warm Regards
> Aditya Sharma
>
>
>
>
> On Fri, Feb 18, 2011 at 12:18 PM, aditya sharma
> <sharmaaditya333 at gmail.com>wrote:
>
> > Hey Jeff..
> >
> > did you check your timezone and timestamp.If not then please check
> it..Its
> > as..
> >
> > => Dashboard => Options => General Options
> >
> > This is where you can change your time stamp so it reflects the time zone
> > you live in. Click "Update Options" to save the change.
> > Warm Regards
> > Aditya Sharma
> >
> >
> >
> >
> >
> > On Fri, Feb 18, 2011 at 10:44 AM, Jeff Rose <jeff at jeffrose.ca> wrote:
> >
> >> Oh great WordPress guru's I need some help.
> >>
> >> I'm writing a plugin that will allow a user to add an event (oy, more
> >> event
> >> plugins) and schedule a reminder email for it.I have 2 problems.
> >>
> >> 1) Sometimes it seems that despite passing in the correct timestamp, the
> >> reminder is set to Jan 1, 1970. I've stepped through in a debugger and a
> >> valid timestamp is passed to wp_schedule_single_event.
> >>
> >> 2) When adding multiple single reminders (1 hour before, 2 hours before,
> 1
> >> day before), often only 1 of the reminders is registered. Again, valid
> >> timestamps, more than 10 minutes apart etc.
> >>
> >> Can anyone suggest why this might happen?
> >>
> >> I'm running on a local XAMPP install and it "could" be a timing issue.
> >> WordPress 3.0.5 install.
> >>
> >> --
> >> Jeff Rose
> >> ------------------
> >> http://www.jeffrose.ca/twitter
> >> http://www.jeffrose.ca/facebook
> >> http://www.linkedin.com/in/JeffeRose
> >> _______________________________________________
> >> wp-hackers mailing list
> >> wp-hackers at lists.automattic.com
> >> http://lists.automattic.com/mailman/listinfo/wp-hackers
> >>
> >
> >
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
--
regards,
Gaurav Aggarwal
IIIrd year student
Computers Engineering
Delhi College of Engineering
More information about the wp-hackers
mailing list