Page 1 of 2

Time Zone

Posted: Wed Aug 12, 2009 10:16 am
by cowai
Hello,
I have a very weird problem with my joomla install.
I have time zone issues. I live in norway, and here we got GMT +1 time zone.

None of my components follow my global config on time zones correctly.
I have to set the global configuration to GMT for both ccBoard and Agora to have the time set correctly. BUT then articles will have a different time. I'm supposed to set my global configuration to GMT +1, and everything will work fine, right?


My config is joomla 1.5.13 inside XAMPP 1.71


Here is my XAMPP readme file:
###### Apache Friends XAMPP Lite (Basis Package) version 1.7.2 ######

+ Apache 2.2.12 (IPV6 enabled)
+ MySQL 5.1.37 (Community Server) with PBXT engine 1.0.08-rc
+ PHP 5.3.0 + PEAR
+ Mini Perl 5.10.0
+ XAMPP Control Version 2.5.8 (ApacheFriends Edition)
+ XAMPP CLI Bundle 1.6
+ XAMPP Port Check 1.4
+ XAMPP Security 1.1
+ SQLite 2.8.17
+ SQLite 3.6.16
+ OpenSSL 0.9.8k
+ phpMyAdmin 3.2.0.1
+ msmtp 1.4.17 (a sendmail compatible SMTP client)
+ Webalizer 2.21-02 (with GeoIP lite)
+ Ming 0.4.2 for PHP
+ PDF with pdflib lite v7.0.4p4 for PHP



Can anybody point me in the right direction?

Thank you,
Cowai

Re: Time Zone

Posted: Wed Aug 12, 2009 10:53 am
by ooffick
Hi Cowai,

if you are in Norway (CEST, Central European Summer Time), you would need to set it to GMT+2, because of the daylight saving time.

GMT +2 = CEST = CET +1

Olaf

Re: Time Zone

Posted: Thu Aug 13, 2009 11:33 am
by cowai
Thanks for answering.
But my problem is that no component is following global config as the articles do.

For example, Agora and ccBoard says the time is 09.03 and the articles says 11.03. It looks like the components is set to GMT.

Help?

Thanks,
Cowai

Re: Time Zone

Posted: Thu Aug 13, 2009 11:42 am
by ooffick
What is your servers time?

Olaf

Re: Time Zone

Posted: Thu Aug 13, 2009 12:25 pm
by cowai
gmt +1. When global config is set to +2 the articles' is in sync with my servers time.
It's a local server with xampp...

Re: Time Zone

Posted: Thu Aug 13, 2009 12:49 pm
by ooffick
I don't know how the other components handle the time differences, you might want to ask the author of those components about that.

Olaf

Re: Time Zone

Posted: Fri Aug 14, 2009 9:41 am
by cowai
My problem is that I know the components is made to follow the global configuration. I have three components that all is set to follow the global configuration, but they don't. That makes me wonder if it's the joomla install itself that's the problem...

Anybody experienced the same thing?

Re: Time Zone

Posted: Fri Aug 14, 2009 9:52 am
by ooffick
Did you check the time zone set for each user in the User Manager as well?

Olaf

Re: Time Zone

Posted: Sat Aug 15, 2009 9:04 pm
by cowai
Yes, I've done this, I've checked that.

Thank you for your replies!

Re: Time Zone

Posted: Sun Aug 16, 2009 11:12 am
by ooffick
What is the setting in Help > System Info > PHP Information > date?

Olaf

Re: Time Zone

Posted: Mon Aug 31, 2009 10:28 am
by lemur1
Hi,
I have the same problem with the server
Linux lvps--xxx--.dedicated.hosteurope.de 2.6.9-023stab048.6-enterprise #1 Server API Apache 2.0 Handler

<<<<<
date
date/time support enabled
"Olson" Timezone Database Version 0.system
Timezone Database internal
Default timezone Europe/Berlin

Directive Local Value Master Value
date.default_latitude 31.7667 31.7667
date.default_longitude 35.2333 35.2333
date.sunrise_zenith 90.583333 90.583333
date.sunset_zenith 90.583333 90.583333
date.timezone no value no value

Can it help to explane the problem?

Leon

Re: Time Zone

Posted: Mon Aug 31, 2009 10:37 am
by ooffick
And in Joomla you have set the timezone to GMT+2, right? You will need to do that, in order to take care of the one hour to take care of the daylight saving.

Olaf

Re: Time Zone

Posted: Mon Aug 31, 2009 10:55 am
by cowai
Yes, ofcourse.

My problem is that no modules/components follow the global settings.

Don't tell me that the bug is in the modules/components, because it isn't.

Re: Time Zone

Posted: Mon Aug 31, 2009 11:34 am
by ooffick
I just tried it, I wrote a quick Module to output the current date and time on the site, and the time and date are displayed in accordance to the timezone settings:

Code: Select all

$date =& JFactory::getDate();
echo JHTML::_('date', $date->toUnix(), JText::_('DATE_FORMAT_LC2'));
Which module / component is not working?

Olaf

Re: Time Zone

Posted: Mon Aug 31, 2009 11:41 am
by lemur1
ooffick wrote:I just tried it, I wrote a quick Module to output the current date and time on the site, and the time and date are displayed in accordance to the timezone settings:

Code: Select all

$date =& JFactory::getDate();
echo JHTML::_('date', $date->toUnix(), JText::_('DATE_FORMAT_LC2'));
Which module / component is not working?

Olaf
How can i use your "module"? Must your code be integrated in extensions?

I have probelems for example with yvcomment and acajoom.

Thanks

Re: Time Zone

Posted: Mon Aug 31, 2009 11:55 am
by ooffick
And where exactly does the Date or timezone setting not work in yvcomment?

I installed it, added some comments, changed the timezone, and the date in the comments changes accordingly.

Please note that you might need to empty the Joomla Cache to display the timezone change.

Olaf

Re: Time Zone

Posted: Mon Aug 31, 2009 12:11 pm
by cowai
Is it possible for you to upload this module as zip so I can install it?
All I want to do is to end this nightmare. The bug is either in my system og in the joomla installation. In modules I think not.

Re: Time Zone

Posted: Mon Aug 31, 2009 12:35 pm
by lemur1
ooffick wrote:And where exactly does the Date or timezone setting not work in yvcomment?

Olaf

You can see it on my test site:
http://test2.frustless.de/index.php/not ... -1211.html

There are the article "fllr1 12:11 " (12:11 = right local time!)
with create date "Montag, 31. August 2009 um 13:07 Uhr " (not right time!)

At fllr1 12:11 (right local time!) was added the comment "fllr1 12:11 comm 12:13":
it has create date "Montag, 31. August 2009 um 13:11 Uhr" -> 2 hour less as the article!

And after a changing of the article (from backend at 13:55 local time) i have:
"Zuletzt aktualisiert (= last changed) am Montag, 31. August 2009 um 12:55 Uhr."
(So, -2 Hour in comparison with create time!)

Configuration:
Server (Ubuntu Linux Apache) time is UTC+2 (Berlin)
Joomla->Configuration->Server-> Time zone: UTC+1 (Amsterdam, Berlin,...)
Personal Time zone: UTC+0 (changing don't help!).

Thanks

Re: Time Zone

Posted: Mon Aug 31, 2009 12:59 pm
by ooffick
cowai wrote:Is it possible for you to upload this module as zip so I can install it?
All I want to do is to end this nightmare. The bug is either in my system og in the joomla installation. In modules I think not.
mod_current_date.zip

Re: Time Zone

Posted: Mon Aug 31, 2009 1:14 pm
by ooffick
lemur1 wrote:Joomla->Configuration->Server-> Time zone: UTC+1 (Amsterdam, Berlin,...)
ok, you will need to set this to GMT+2
Please make sure your cache is switched off (Global Configuration) for the moment, so you can see the changes of the timezone.

Olaf

Re: Time Zone

Posted: Mon Aug 31, 2009 1:19 pm
by lemur1
ooffick wrote:
mod_current_date.zip
I have installed your module.

It shows time: - 1 hour relativ my local time (see my setings above).

What i have to do, please?

Re: Time Zone

Posted: Mon Aug 31, 2009 2:12 pm
by ooffick
lemur1 wrote:
ooffick wrote:
mod_current_date.zip
I have installed your module.

It shows time: - 1 hour relativ my local time (see my setings above).

What i have to do, please?
Since UTC+2 = GMT+2 = CEST = CET +1, you will need to set your timezone to GMT+2 and not GMT+1 in the global configuration.

CET = Central European Time
CEST = Central European Summer Time
GMT = Greenwich Mean Time
UTC = Coordinated Universal Time

Olaf

Re: Time Zone

Posted: Mon Aug 31, 2009 3:17 pm
by lemur1
Since UTC+2 = GMT+2 = CEST = CET +1, you will need to set your timezone to GMT+2 and not GMT+1 in the global configuration.

Olaf
Thank you,

but if I set
Joomla->Configuration->Server-> Time zone: UTC+2
Personal Time zone:
regardless of whether UTC+0 or UTC+2

i get an article with a wrong time: +2 hour to local time :-((.

See an example:
http://test2.frustless.de/index.php/not ... /2510.html

i can send you a backend password with Private message.

Leon

Re: Time Zone

Posted: Mon Aug 31, 2009 10:10 pm
by ooffick
Do you have access to the server via SSH?
if so can you try this:

Code: Select all

date -u
Olaf

Re: Time Zone

Posted: Tue Sep 01, 2009 7:46 am
by lemur1
ooffick wrote:Do you have access to the server via SSH?
if so can you try this:

Code: Select all

date -u
Olaf
Yes,
at 9:41 local time i get on the command

Code: Select all

date -u
Di 1. Sep 07:41:19 UTC 2009

But in Plesk -> Server -> Timezone I have

UTC+2 .

Is it not strange?

Thanks.

Re: Time Zone

Posted: Tue Sep 01, 2009 8:05 am
by ooffick
That's ok. That command gives you the UTC time.
if you just type in date, it should give you the local time.

However, your system is setup to display the day as Di instead of Tue
Can you try this:

Code: Select all

date -Ru
The R is upper case.

and can you try this as well:

Code: Select all

php -r "echo date('r');"
Moreover, can you look into the database jos_content. And have a look at the date columns, pick one article, what do you have in there?

What extensions do you have installed?
Which Joomla! version do you have?

Olaf

Re: Time Zone

Posted: Tue Sep 01, 2009 12:12 pm
by lemur1
ooffick wrote:

Code: Select all

date -Ru
The R is upper case.
Olaf
Tue, 01 Sep 2009 11:50:50 +0000

(local time is 13:50)

("Di" is "Tue" in German)

-----------
and can you try this as well:

Code: Select all

php -r "echo date('r');"
Tue, 01 Sep 2009 13:52:04 +0200

-----------
Moreover, can you look into the database jos_content. And have a look at the date columns, pick one article, what do you have in there?

created: 2009-09-01 11:50:00 (local time is 13:50)
(in frontend is shown the right time: Dienstag, 01. September 2009 um 13:50 Uhr)


-------------------
What extensions do you have installed?
Which Joomla! version do you have?

I use J1.5.14
Many extensions are installed:
eXtplorer,
CB,
Chronoforms,
JCE,
JoomlaPack,
JoomlaWatch
SectionNavigatotor,
yvComment etc.


but i have problems with time (see above my posts):
1. in Joomla itself (created time and edited time)
2. yvComment
3. Acajoom.

Thanks

Leon

Re: Time Zone

Posted: Tue Sep 01, 2009 12:27 pm
by ooffick
Well, the setting in Joomla needs to be GMT+2, so if this is set the small current time module displays the correct time.

If it is set to GMT+2, which ones are corrected then?
Otherwise did you try to modify the setting to GMT or GMT+1 ?

Olaf

Re: Time Zone

Posted: Tue Sep 01, 2009 1:07 pm
by lemur1
ooffick wrote:Well, the setting in Joomla needs to be GMT+2, so if this is set the small current time module displays the correct time.

If it is set to GMT+2, which ones are corrected then?
Otherwise did you try to modify the setting to GMT or GMT+1 ?

Olaf

Thanks,
--------
Joomla -> Congiguration -> Timezone: UTC+2

Joomla -> User (of the article above) -> Parameter -> Timezone: UTC+2 (changing don't help)

-----------
Your module displays the correct time:

mod_current_date
Dienstag, 01. September 2009 um 14:56 Uhr

----
Zonetime is set to GMT+2 by me 6 months before.
I have tried to modify the setting to GMT or GMT+1, but it didn't help.
when I set a one parameter right, the other is wrong :-((.

Leon

Re: Time Zone

Posted: Tue Sep 01, 2009 1:18 pm
by ooffick
If the timezone is set to Timezone: UTC+2, how are yvComment, Acajoom reacting?

Olaf