Support Forum Softcomplex logo
About Us  | Services  | Download  | Order  | Support  | |
| Search | Today's Posts | Stats | Board Rules | Not logged in [ Login | Register ]
go to bottom
Last active: Never

Printable Version | Subscribe | Add to Favourites   Post new thread
Author: Subject: Date changes early!
AndRock238
Junior Member

Posts: 5
Registered: 12/21/2004
Member Is Offline
posted on 12/25/2004 at 10:05 AM Reply With Quote
Date changes early!


I have been noticing that the day changes about 3 hours before the day is suppose to change. I noticed that for example yesterday was the 24th of December, and at 9:00 pm the date changed over to the 25th of December. I thought it might have something to do with the time zone setting that I had, being that I had the time zone set to a GMT + 3, so I changed the Time Zone to a GMT 0 setting, but it is still doing it. No matter what time zone I select, it still changes about 3 hours early.

Can anybody give a helpful suggestion on how to fix this problem. Thanks again for your time.
View User's Profile View All Posts By User U2U Member
AndRock238
Junior Member

Posts: 5
Registered: 12/21/2004
Member Is Offline
posted on 12/30/2004 at 05:38 AM Reply With Quote
Fixed it myself...


Since I wasn't getting any replies and getting sick of waiting, I went old school and read the code for myself. Anyways, it seems that on a windows system, the time zone setting is pointless because the calendar is just reading your system clock, and you should already have your time zone set there.

I had the time zone setting set to GMT + 3 and the date was changing 3 hours early, and I even tried changing my time zone back to GMT 0 but it was still doing it, not sure if there is a bug in the time zone setting.

Anyways, I went into calendar.php and edited the get_date() function as follows, on the last line of the function where is says $time+$timezone, I just erased the +$timezone part of it and it works like a charm.



function get_date($format,$time=0){
$timezone = $this->a_template['timezone'];
if(!$time)$time=time();
if(!$timezone) $timezone=date('Z');
else $timezone = $timezone*3600;
return date($format,$time+$timezone);
}


change to this:

function get_date($format,$time=0){
$timezone = $this->a_template['timezone'];
if(!$time)$time=time();
if(!$timezone) $timezone=date('Z');
else $timezone = $timezone*3600;
return date($format,$time);
}


Anyways, that might help some people, or other people were probably already smart enough to figure that one out.
View User's Profile View All Posts By User U2U Member
Post new thread

Related Links:
Product Page
Product Demonstrations Live Demos
Free/Trial Script Download Free Download
Product Documentation Documentation
Documentation page
Change Log
Support Forum Support Forum
Order Now ORDER NOW!
Add to Cart
View Cart
 

Go To Top


Powered by XMB 1.9.1 Nexus
Developed By Aventure Media & The XMB Group © 2002-2004