Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » Timezone

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

Page: 1
Go to End
Author Topic: 16444 Views
  • Shane Garelja
    Avatar
    Community Member
    18 Posts

    Timezone Link to this post

    Firstly, fantastic framework! This is exactly what I have been looking for and why I have spent the last few years intermittently writing my own CMS as all the others out there are far to restrictive. My one sits on top of a framework that uses XML to define data models for content, you guys have used a similar approach to what I have done except it's all done with PHP and is obviously ~considerably~ more advanced

    After completing my first SS implementation last weekend (http://www.kiwi-ise.co.nz/) I am looking forward to learning much more about this framework.

    I do have a simple question to start with and I have hunted everywhere... is it possible to change the default timezone for SS if your site is hosted in a different country? Is there a reference doc with all the config settings that would cover this?

    Thanks again! And sorry Sig/Tim that it's taken you about 2 years to convince us [Doubleclique] to try this

  • simon_w
    Avatar
    Forum Moderator
    467 Posts

    Re: Timezone Link to this post

    In mysite/_config.php:

    date_default_timezone_set('zone');

    A list of available time zones is available here

  • Shane Garelja
    Avatar
    Community Member
    18 Posts

    Re: Timezone Link to this post

    Thanks Simon! Could you tell me where this is documented?

  • simon_w
    Avatar
    Forum Moderator
    467 Posts

    Re: Timezone Link to this post

  • Shane Garelja
    Avatar
    Community Member
    18 Posts

    Re: Timezone Link to this post

    HAHAHA - no, I mean the date_default_timezone_set() method - I could not find this anywhere in docs or forum... is this just something you "know"?

  • simon_w
    Avatar
    Forum Moderator
    467 Posts

    Re: Timezone Link to this post

    Yeah. It's not actually part of SilverStripe, but it changes the default timezone that PHP uses for everything involving dates, including all Date* classes in SilverStripe.

  • Shane Garelja
    Avatar
    Community Member
    18 Posts

    Re: Timezone Link to this post

    Of course! Thanks

    For some strange reason it does not seem to have done what I expected... I thought this would change all the times for comments, blogs, forum posts etc??

  • Louie
    Avatar
    Community Member
    9 Posts

    Re: Timezone Link to this post

    hello! im having the same problem... what if my site doesn't have a mysite/_config.php.. where else can I put date_default_timezone_set('......'); into?

    16444 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.