# TimeZone adjustment & display

**URL:** <https://www.ruby-forum.com/t/timezone-adjustment-display/124375>\
**Category:** Radiant CMS\
**Created:** [December 28, 2007, 5:17am UTC](https://www.ruby-forum.com/t/timezone-adjustment-display/124375 "2007-12-28T05:17:18Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![bburcham](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/f9ae1b/32.png) [@bburcham](https://www.ruby-forum.com/u/bburcham)\
**Post date:** [December 28, 2007, 5:17am UTC](https://www.ruby-forum.com/t/timezone-adjustment-display/124375/1 "2007-12-28T05:17:18Z")

</div>

First let me say that I’m just getting started using Radiant; it looks  
very cool and will be useful to the client I’m setting it up for.

I wanted to note the method I used to set the timezone for my  
installation so it will be in the mailing list archives, and to make a  
very small suggestion.

I found the details regarding setting the timezone in  
app/models/radiant/config.rb which pointed me to  
[http://api.rubyonrails.org/classes/TimeZone.html](http://api.rubyonrails.org/classes/TimeZone.html) for details on TimeZone  
specification in Rails. For my installation I did:

$ ./script/console production

> > Radiant::Config[“local.timezone”] = “Pacific Time (US & Canada)”

It was useful to find a to\_hash method as well:

> > Radiant::Config.to\_hash  
> > =\> {“defaults.page.parts”=\>“body, extended”,  
> > “defaults.page.status”=\>“draft”, “admin.title”=\>“Radiant CMS”,  
> > “admin.subtitle”=\>“Publishing for Small Teams”,  
> > “local.timezone”=\>“Pacific Time (US & Canada)”}

My suggestion would be to alter the updated\_at string that shows in the  
page edit view (app/views/admin/page/edit.rhtml) to show the timezone.  
It gets the string from the timestamp method in  
app/helpers/application\_helper.rb which looks like:  
adjust\_time(time).strftime(“%I:%M %p on %B %d, %Y”)

If it was  
adjust\_time(time).strftime(“%I:%M %p %Z on %B %d, %Y”)

then the time zone would also appear on the “page editing” page. I  
expect we’ll have people in multiple time zones editing pages, and this  
would help them.

Thanks for a very cool app! Bill

---

<div class="post-metadata">

**Author:** ![bburcham](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/f9ae1b/32.png) [@bburcham](https://www.ruby-forum.com/u/bburcham)\
**Post date:** [January 9, 2008, 7:50am UTC](https://www.ruby-forum.com/t/timezone-adjustment-display/124375/2 "2008-01-09T07:50:44Z")

</div>

On Thu, 2007-12-27 at 20:16 -0800, Bill B. wrote:

> I found the details regarding setting the timezone in  
> app/models/radiant/config.rb which pointed me to  
> [http://api.rubyonrails.org/classes/TimeZone.html](http://api.rubyonrails.org/classes/TimeZone.html) for details on TimeZone  
> specification in Rails. For my installation I did:
> 
> $ ./script/console production
> 
> > > Radiant::Config[“local.timezone”] = “Pacific Time (US & Canada)”

I’ve been finding lots of little gems in the mailing list. Like what  
should have been obvious… A better place than the console for setting  
configuration data is, duh… in config/environment.rb. At the bottom I  
put:

require ‘radiant/config’  
Radiant::Config[“local.timezone”] = “Pacific Time (US & Canada)”

Bill

---

<div class="post-metadata">

**Author:** ![bburcham](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/f9ae1b/32.png) [@bburcham](https://www.ruby-forum.com/u/bburcham)\
**Post date:** [January 9, 2008, 2:09pm UTC](https://www.ruby-forum.com/t/timezone-adjustment-display/124375/3 "2008-01-09T14:09:04Z")

</div>

On 1/9/08, Bill B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I’ve been finding lots of little gems in the mailing list. Like what  
> should have been obvious…

If anyone feels like they would have the time to put together lots of  
little “How To” articles detailing techniques of this nature, I would  
love to give you access to the Radiant Blog so that you could do that  
there. E-mail me personally if this sounds like something up your  
alley.

–  
John L.  
[http://wiseheartdesign.com](http://wiseheartdesign.com)

---

<div class="post-metadata">

**Author:** ![bburcham](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/f9ae1b/32.png) [@bburcham](https://www.ruby-forum.com/u/bburcham)\
**Post date:** [January 9, 2008, 3:36pm UTC](https://www.ruby-forum.com/t/timezone-adjustment-display/124375/4 "2008-01-09T15:36:26Z")

</div>

“John L.” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) writes:

> On 1/9/08, Bill B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> > I’ve been finding lots of little gems in the mailing list. Like what  
> > should have been obvious…
> 
> If anyone feels like they would have the time to put together lots of  
> little “How To” articles detailing techniques of this nature, I would  
> love to give you access to the Radiant Blog so that you could do that  
> there. E-mail me personally if this sounds like something up your  
> alley.

We could at least start getting this all on the wiki.

A community effort to finish the Radiant Handbook could also do  
wonders for bringing on new users. That actually brings me to a  
question: should we all feel impowered to just directly work on  
additions to the wiki handbook or should we post revisions here first?

–  
J Aaron F. [jadetower.com](http://jadetower.com) [US] +1 724-964-4515  
é¦®å‚‘ä» [cubiclemuses.com](http://cubiclemuses.com) [HK] +852 8123-7905

---

<div class="post-metadata">

**Author:** ![bburcham](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/f9ae1b/32.png) [@bburcham](https://www.ruby-forum.com/u/bburcham)\
**Post date:** [January 9, 2008, 3:46pm UTC](https://www.ruby-forum.com/t/timezone-adjustment-display/124375/5 "2008-01-09T15:46:28Z")

</div>

On Jan 9, 2008, at 9:35 AM, J Aaron F. wrote:

> > alley.
> 
> We could at least start getting this all on the wiki.

I’d rather see at least an intro to the HowTo appear on the Blog. It’s  
nice to have fresh content there.

> A community effort to finish the Radiant Handbook could also do  
> wonders for bringing on new users. That actually brings me to a  
> question: should we all feel impowered to just directly work on  
> additions to the wiki handbook or should we post revisions here first?

Feel empowered. Bless you my son. 🙂

–  
John L.  
[http://wiseheartdesign.com](http://wiseheartdesign.com)
