# Client local time

**URL:** <https://www.ruby-forum.com/t/client-local-time/172773>\
**Category:** Rails\
**Created:** [July 27, 2009, 9:37pm UTC](https://www.ruby-forum.com/t/client-local-time/172773 "2009-07-27T21:37:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![CiriusMex](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/90ced4/32.png) [@CiriusMex](https://www.ruby-forum.com/u/CiriusMex)\
**Post date:** [July 27, 2009, 9:37pm UTC](https://www.ruby-forum.com/t/client-local-time/172773/1 "2009-07-27T21:37:34Z")

</div>

Hi folks ^^

Ok think it’s gonna be pretty easy but can’t find any solution on  
internet…I need to get the client local time in order to get  
database informations in function of the client time and not the  
server one. How can I do with RoR?

Any idea?

Olivier.

---

<div class="post-metadata">

**Author:** ![CiriusMex](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/90ced4/32.png) [@CiriusMex](https://www.ruby-forum.com/u/CiriusMex)\
**Post date:** [July 27, 2009, 10:54pm UTC](https://www.ruby-forum.com/t/client-local-time/172773/2 "2009-07-27T22:54:13Z")

</div>

On Jul 27, 3:35 pm, CiriusMex [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Hi folks ^^
> 
> Ok think it’s gonna be pretty easy but can’t find any solution on  
> internet…I need to get the client local time in order to get  
> database informations in function of the client time and not the  
> server one. How can I do with RoR?

You’d have to write some javascript to do that (and then hope that the  
user has the time set correctly)

Fred
