Welcome, Guest. Please login or register.
Did you miss your activation email?
May 26, 2012, 07:16:33 PM

Login with username, password and session length
Search:     Advanced search
Interested in joining the WebsiteBaker team?
For more Information read here or on our new website.
155550 Posts in 21714 Topics by 7737 Members
Latest Member: gx-world
* Home Help Search Login Register
Pages: [1]   Go Down
Print
Author Topic: Problem with timezone in News module  (Read 1070 times)
contactjw

Offline Offline

Posts: 28


« on: July 24, 2011, 12:33:35 AM »

For some reason the posted time in the News module is showing a 3 hours difference from the set timezone. I'm using WB 2.8.1. What could be causing this?
Logged
badknight
Moderator
**
Offline Offline

Posts: 246



WWW
« Reply #1 on: July 24, 2011, 12:55:08 AM »

the time setting on the server is correct?
Logged

Ich würde gern die Welt verändern, doch Gott gibt mir den Quellcode nicht...
sbcobra

Offline Offline

Posts: 8


« Reply #2 on: August 09, 2011, 08:50:48 PM »

i got the same problem with the news module and
also the whole site is giveing differt time
in my control panel the time is correct.
Logged
DarkViper
Development Team
*****
Offline Offline

Posts: 1253


« Reply #3 on: August 09, 2011, 09:10:51 PM »

it's a known problem and will be fixed in next version of the news module. As well as some other issues also.
Logged

Anleitungen lesen und selber nachdenken ist anstrengend...  Da lass ich doch lieber andere für mich denken...

In 1984:  Nineteen Eighty-Four is a unrealistic utopia!!
In 2012:  Nineteen Eighty-Four is a little piece only of our reality!!
sbcobra

Offline Offline

Posts: 8


« Reply #4 on: August 09, 2011, 09:29:26 PM »

okay so in my control panel the time is correct
on the site it is not that issue is known and will be fixed soon?

The news module i delete the time only date will display now
but still my site gives me a different time as the time i saved in the control panel...
Logged
pcwacht
AddOn Development
*
Offline Offline

Posts: 2859



WWW
« Reply #5 on: August 09, 2011, 09:41:02 PM »

What control panel are you talking about?
You know there are date related settings in : WB->admin->setiings->advanced settings
and allso by user preferences?

John

Logged

http://www.ictwacht.nl = Dutch ICT info
http://www.pcwacht.nl = My first
both still work in progress, since years.....
sbcobra

Offline Offline

Posts: 8


« Reply #6 on: August 09, 2011, 09:44:38 PM »

I have the right time in WB->admin->setiings->advanced settings
but the website displays 2 hours earlier

Dutch

De tijd in WB->admin->setiings->advanced settings
is goed ingesteld komt overeen met mijn pc tijd echter de site geeft een andere tijd weer namelijk 2 uur eerder..
Logged
pcwacht
AddOn Development
*
Offline Offline

Posts: 2859



WWW
« Reply #7 on: August 09, 2011, 09:50:43 PM »

allso by user preferences <----

Since you need to be logged in while you enter pages/news etc. this is rather essential as well!


(Dutch)
Ook bij gebruikers instellingen?
Omdat je ingelogd moet zijn als je een pagina/news etc aanmaakt is dit natuurlijk ook belangrijk!


Have fun,
John
Logged

http://www.ictwacht.nl = Dutch ICT info
http://www.pcwacht.nl = My first
both still work in progress, since years.....
sbcobra

Offline Offline

Posts: 8


« Reply #8 on: August 09, 2011, 09:57:04 PM »

In the new module i deleted the posttime code so the time of posting will not be showed only the date .
Thats fine for me
but still the time on my site is different

by user preferences everythings is fine btw i got 1 admin account no other users



Dutch

Ik heb in de nieuws module de tijd weggehaald nu geeft hij alleen de post datum weer en niet meer de tijd
dus daar ben ik zo blij mee
echter blijft de tijd op de site 2 uur achterlopen.

bij gebruikers instellingen staat het goed ik heb maar 1 gebruiker account
« Last Edit: August 09, 2011, 09:59:35 PM by sbcobra » Logged
pcwacht
AddOn Development
*
Offline Offline

Posts: 2859



WWW
« Reply #9 on: August 09, 2011, 10:07:53 PM »

I know this of the user preferences since I stumbled upon the same time differences.
I really needed to tell WB both in settings and (mine allso as admin) preferences to get it right.
At both places I needed the GMT-2 (Since we are in holland)

John
Logged

http://www.ictwacht.nl = Dutch ICT info
http://www.pcwacht.nl = My first
both still work in progress, since years.....
pcwacht
AddOn Development
*
Offline Offline

Posts: 2859



WWW
« Reply #10 on: August 09, 2011, 10:12:36 PM »

OOPS MY BAD!!

To be sure I checked and see the above is wrong, sorry!

In settings I have GMT+1 and in preferences I have GMT and time is showing ok
Just posted a test newsitem at www.pcwacht.nl-> nieuws there you can see time and compare this to this post time (hmm seems wb forum runs a hour slow -
edit: checked wb forum profile and corrected it)

John  
« Last Edit: August 09, 2011, 10:15:01 PM by pcwacht » Logged

http://www.ictwacht.nl = Dutch ICT info
http://www.pcwacht.nl = My first
both still work in progress, since years.....
sbcobra

Offline Offline

Posts: 8


« Reply #11 on: August 09, 2011, 10:13:18 PM »

i can do what i want GMT-2 +4 nothing works
time's still stays the same

i dont have this problem with the news module but with my complete site.
« Last Edit: August 09, 2011, 10:16:37 PM by sbcobra » Logged
pcwacht
AddOn Development
*
Offline Offline

Posts: 2859



WWW
« Reply #12 on: August 09, 2011, 10:16:59 PM »

If you goto settings and change the time zone, the time_format should change time in relation to time zone.

If that is correct then a new news post might help if it is global wb related or news module related.

edit: could allso be that web-server time is not correct!

John
Logged

http://www.ictwacht.nl = Dutch ICT info
http://www.pcwacht.nl = My first
both still work in progress, since years.....
sbcobra

Offline Offline

Posts: 8


« Reply #13 on: August 09, 2011, 10:22:03 PM »

I changed the server time
all my old pages are okay now but when i create new pages the time is incorrect..
« Last Edit: August 10, 2011, 09:57:00 PM by sbcobra » Logged
pcwacht
AddOn Development
*
Offline Offline

Posts: 2859



WWW
« Reply #14 on: August 11, 2011, 09:34:49 PM »

There needs to be a setting in php.ini on the webserver to tell it the default timezone to use
For dutch users it would be
Quote
[Date]
; Defines the default timezone used by the date functions
date.timezone = "Europe/Amsterdam"
do NOT forget the quotes!!
After setting it sometimes a webserver (apache) restart is needed.

If this one isn't set the time will be 2 hours off in the Netherlands.

More info: http://php.net/manual/en/timezones.php

To check your settings run this in a code page:
Code:
if (ini_get('date.timezone')) {
    echo '<br />date.timezone: ' . ini_get('date.timezone');
}
echo '<br />Time on server: '.date('H:i:s');
If your settings are correct, then there is no need to set the timezone offset in the settings of wb!

Have fun!
John
Logged

http://www.ictwacht.nl = Dutch ICT info
http://www.pcwacht.nl = My first
both still work in progress, since years.....
crnogorac081
AddOn Development
*
Offline Offline

Posts: 1706



« Reply #15 on: August 11, 2011, 11:41:56 PM »

I solved this like this:

open view.php and find and replace
Code:
$t = time();

with

$t = time()+TIMEZONE;

cheers,
Ivan
Logged

Wow, I coded something myself: PM Messanger Modul ,Searchbox with suggestions
Pages: [1]   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!