[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Phpgroupware-developers] Date problem with calendar
From: |
Mark A Peters (Skeeter) |
Subject: |
Re: [Phpgroupware-developers] Date problem with calendar |
Date: |
Sun, 1 Sep 2002 22:44:56 -0400 (EDT) |
It took me nearly 40 times to read this and understand what could've been
wrong. But after breaking down what was being said here (not a problem on
what was being said or how it was being said, just a problem opening my
ears to hear what was being said), I finally seen what the problem was.
The gmtnow variable was being set to just the servers tz_offset instead of
truely being set to the GMT calculation of the servers current time - the
servers tz_offset. So, this has been corrected. Michael Meskes, try an
update and try again. I'll bet this solves your problem.
Thanks,
Mark A Peters (Skeeter)
On 21 Aug 2002, Stephan Cremer wrote:
> /* $Id: class.datetime.inc.php,v 1.5.2.7 2002/08/12 22:50:30 skeeter Exp
> $ */
>
> in function datetime, the member variable $this->users_localtime is
> calculated as the difference between $this->gmtnow and $this->tz_offset
>
> * if $GLOBALS['phpgw_info']['server']['tz_offset'] is set,
> $this->gmtnow is set to result of time() minus the this offset
>
> * if the offset is not set, function $this->gmtnow is set to the result
> of $this->getbestguess()
>
> Now function $this->getbestguess returns the difference between
>
> $this->convert_rfc_to_epoch(gmdate('D, d M Y H:i:s',$server_time).'
> GMT') and time()
>
> The result - at least in my case - is equal to the offset between GMT
> and the time zone where I am located at.
>
>
> => Whereas function datetime will set users_localtime correct if a time
> server is specified, this variable will be set to the timezone offset if
> not - i.e. getbestguess() is called...
>
> Best Regards,
> Stephan.
>
>
>
> > Hi,
> >
> > I have a strange problem with the calendar date on one of my
> > installations. It always insists that we have January 1st, 1970. Once I
> > change the view inside the calendar app everything is fine again, but
> > leaving calendar and going back in brings me back to 1970.
> >
> > To make matters more confusing, this installation is a copy from another
> > server, where everything runs fine. And yes, I copied the whole
> > phpgroupware tree and the whole database. Of course there has to be a
> > difference somewhere.
> >
> > I digged into the sources and found the reason I think.
> > $GLOBALS['phpgw_info']['server']['tz_offset'] is set to a very high
> > value almost 300000. Once I set this to zero (or whatever reasonable
> > value) it works nicely. To dig any further I need to know where
> > $GLOBALS['phpgw_info']['server']['tz_offset'] gets its info from, but I
> > couldn't find that. I traced through datetime::datetime but it appears
> > the first time this function is called
> > $GLOBALS['phpgw_info']['server']['tz_offset'] is already set.
> >
> > Anyone out there with an idea what's going wrong?
> >
> > Thanks a lot.
> >
> > Michael
> >
> > --
> > Michael Meskes
> > address@hidden
> > Go SF 49ers! Go Rhein Fire!
> > Use Debian GNU/Linux! Use PostgreSQL!
> >
> >
> > _______________________________________________
> > Phpgroupware-developers mailing list
> > address@hidden
> > http://mail.gnu.org/mailman/listinfo/phpgroupware-developers
> >
>
>
>
>
> _______________________________________________
> Phpgroupware-developers mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/phpgroupware-developers
>
- Re: [Phpgroupware-developers] Date problem with calendar,
Mark A Peters (Skeeter) <=