Setting the Timezone of an install

436 views
Skip to first unread message

Marin

unread,
Aug 28, 2014, 9:44:59 AM8/28/14
to resour...@googlegroups.com

Hello all,


i tried to set the timezone to Europe/Berlin with this line:
if (function_exists("date_default_timezone_set")) {date_default_timezone_set("GMT");}


But the install is still 2 hours behind our time.
CET doesnt change this neither.
GMT+1 breaks the whole site :)

any hints are highly appreciated.

Jeff Nova

unread,
Aug 28, 2014, 8:24:09 PM8/28/14
to resour...@googlegroups.com
Isn't this a config?

Jeff

--
Jeff Nova
Chief Executive Officer
Colorhythm LLC

Main Office:  +1 415-399-9921
Mobile:  +1 510-710-9590

--
ResourceSpace: Open Source Digital Asset Management
http://www.resourcespace.org
---
You received this message because you are subscribed to the Google Groups "ResourceSpace" group.
To unsubscribe from this group and stop receiving emails from it, send an email to resourcespac...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Allison Stec

unread,
Aug 29, 2014, 8:09:23 AM8/29/14
to ResourceSpace
date_default_timezone_set() only works with php 5.1.0+...what version of php are you running?

There are also timezone setting in your php.ini file and my.cnf that you could try.



Allison Stec
Asset Management Specialist
Colorhythm

Marin

unread,
Sep 17, 2014, 6:20:15 PM9/17/14
to resour...@googlegroups.com
Hello Allison,


thank you for your reply! Why didnt the group notify me about it?
I am running this version : PHP 5.5.9-1ubuntu4.3 (cli) (built: Jul  7 2014 16:36:58)

Can you tell me the allowed parameters for the date_default_timezone_set() command?


Allison Stec

unread,
Sep 18, 2014, 9:41:39 AM9/18/14
to ResourceSpace

Marin

unread,
Sep 18, 2014, 9:45:21 AM9/18/14
to resour...@googlegroups.com
Hi Allison,


i set the php.ini to
date.timezone = "Europe/Berlin"

But its still 2 behind the Berlin time.
Do you mean that i can also set "Europe/Berlin" in the config.php of resource space?

thank you
Andreas

Marin

unread,
Sep 18, 2014, 9:48:24 AM9/18/14
to resour...@googlegroups.com
This doesnt seem to work for me:
# Set your time zone below (default GMT)
if (function_exists("date_default_timezone_set")) {date_default_timezone_set("Europe/Berlin");}






Am Donnerstag, 18. September 2014 15:41:39 UTC+2 schrieb Allison Stec:

Yadin Flammer

unread,
Jul 18, 2017, 5:17:28 PM7/18/17
to ResourceSpace
3 years later and still an issue it seems, and this was never answered...
The time stamp on uploads is in GMT.  We need it in Eastern time, auto adjusted by EST or EDT, as PHP works.  However RS has it's own internal command for this and we can't find documentation on the needed syntax anywhere.

config.default.php
351:# Set your time zone below (default GMT)
352:if (function_exists("date_default_timezone_set")) {date_default_timezone_set("GMT");}

So instead of GMT on line 352 (or a copy thereof in the config.php), what do we put?  Will EST work and auto adjust for daylight savings time?  php.ini uses date.timezone = America/New_York which auto adjusts, but as noted that syntax does not work in the config.ini, so what do?
Kind of hard to believe it's not reading the php settings, I guess that's for flexibility of server vs instance?  But then why not have this in the system settings in the UI?  Just a little baffling that we suddenly after a year realize all the timestamps are off by 4-5 hours... 

Allison Stec

unread,
Jul 18, 2017, 5:22:42 PM7/18/17
to resour...@googlegroups.com
‘date_default_timezone_set()’ is a php function, so you need to reference there documentation for proper settings: http://php.net/manual/en/function.date-default-timezone-set.php

Allison Stec


--
ResourceSpace: Open Source Digital Asset Management

Yadin Flammer

unread,
Jul 18, 2017, 10:04:10 PM7/18/17
to ResourceSpace
So why doesn't it seem to work?  Is there simply a way to remove this redundancy and have RS use the setting that is in php.ini?

Allison Stec

unread,
Jul 19, 2017, 7:15:21 AM7/19/17
to resour...@googlegroups.com
You could comment it out to see if that helps, though I’m not sure that’s really your issue.

Remember that there’s a way to set the timezone in mysql and on the server, so it’s possible these are not all set the same way. Log files, for example, rely on the date/time setting of mysql.

Allison Stec



On July 18, 2017 at 10:05:56 PM, Yadin Flammer (ebonw...@gmail.com) wrote:

So why doesn't it seem to work?  Is there simply a way to remove this redundancy and have RS use the setting that is in php.ini?
Reply all
Reply to author
Forward
0 new messages