# Time Zone

**URL:** <https://www.ruby-forum.com/t/time-zone/150818>\
**Category:** Rails\
**Created:** [October 13, 2008, 7:02pm UTC](https://www.ruby-forum.com/t/time-zone/150818 "2008-10-13T19:02:44Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Abhishek\_shukla](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/7cd45c/32.png) [@Abhishek\_shukla](https://www.ruby-forum.com/u/Abhishek_shukla)\
**Post date:** [October 13, 2008, 7:02pm UTC](https://www.ruby-forum.com/t/time-zone/150818/1 "2008-10-13T19:02:44Z")

</div>

Hello friends,  
My question is like if the user select the time zone for his country the  
application timezone should display the selected time zone.

so for implement this what i should do?

regards  
abhi

---

<div class="post-metadata">

**Author:** ![Abhishek\_shukla](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/7cd45c/32.png) [@Abhishek\_shukla](https://www.ruby-forum.com/u/Abhishek_shukla)\
**Post date:** [October 14, 2008, 5:37am UTC](https://www.ruby-forum.com/t/time-zone/150818/2 "2008-10-14T05:37:17Z")

</div>

Follow this tutorial:

> **[Mad Mimi Email Marketing](https://madmimi.com)**
>
> Mad Mimi makes it simple to send HTML email newsletters, grow your subscribers and manage your email list. Sign up today!

Abhishek shukla wrote:

> Hello friends,  
> My question is like if the user select the time zone for his country the  
> application timezone should display the selected time zone.
> 
> so for implement this what i should do?
> 
> regards  
> abhi

---

<div class="post-metadata">

**Author:** ![Abhishek\_shukla](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/7cd45c/32.png) [@Abhishek\_shukla](https://www.ruby-forum.com/u/Abhishek_shukla)\
**Post date:** [October 14, 2008, 9:25am UTC](https://www.ruby-forum.com/t/time-zone/150818/3 "2008-10-14T09:25:12Z")

</div>

Hi nathan,  
Thanks for your response,  
Still i am very confuse my requirement is like a user save there  
timezone,  
then whenever he logs in he should see the time as per wat he set in  
timezone currently it displaying my system timezone.

So what excatly i’ll need to do? Do i need to create a method in which  
i’ll  
need to set the timezone?

On Tue, Oct 14, 2008 at 9:07 AM, Nathan E. \<

---

<div class="post-metadata">

**Author:** ![Abhishek\_shukla](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/7cd45c/32.png) [@Abhishek\_shukla](https://www.ruby-forum.com/u/Abhishek_shukla)\
**Post date:** [October 15, 2008, 4:32pm UTC](https://www.ruby-forum.com/t/time-zone/150818/4 "2008-10-15T16:32:16Z")

</div>

On Tue, Oct 14, 2008 at 12:24 AM, Abhishek shukla [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> Still i am very confuse my requirement is like a user save there timezone,  
> then whenever he logs in he should see the time as per wat he set in  
> timezone currently it displaying my system timezone.
> 
> So what excatly i’ll need to do? Do i need to create a method in which i’ll  
> need to set the timezone?

If you store the timezone as part of the user model, displaying the  
appropriate local time would just be:  
@user.tz.now

## HTH,

Hassan S. ------------------------ removed\_email\_address@domain.invalid
