# Time value won't come back from UTC

**URL:** <https://www.ruby-forum.com/t/time-value-wont-come-back-from-utc/148331>\
**Category:** Rails\
**Created:** [September 11, 2008, 7:51pm UTC](https://www.ruby-forum.com/t/time-value-wont-come-back-from-utc/148331 "2008-09-11T19:51:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sclarke](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b19c9b/32.png) [@sclarke](https://www.ruby-forum.com/u/sclarke)\
**Post date:** [September 11, 2008, 7:51pm UTC](https://www.ruby-forum.com/t/time-value-wont-come-back-from-utc/148331/1 "2008-09-11T19:51:44Z")

</div>

Hi there,

I’m fairly new to RoR, and I seem to be having a problem with :time  
types.

I save my times with a time\_select on my form, to a time type field on  
MySQL.

Rails automatically pulls it back to UTC from my timezone (+02:00),  
but when I display it again, it stays at the UTC value, i.e. I enter  
in 6:30, and I get 4:30 on my list.

Is it just me, or is this a limitation of the time datatype in mysql,  
obviously all the datetime conversions work perfectly, like in my  
timestamps…

Any help would be greatly appreciated.

---

<div class="post-metadata">

**Author:** ![sclarke](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b19c9b/32.png) [@sclarke](https://www.ruby-forum.com/u/sclarke)\
**Post date:** [September 11, 2008, 11:24pm UTC](https://www.ruby-forum.com/t/time-value-wont-come-back-from-utc/148331/2 "2008-09-11T23:24:19Z")

</div>

On Thu, Sep 11, 2008 at 10:42 AM, Stuart C.  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)wrote:

> but when I display it again, it stays at the UTC value, i.e. I enter  
> in 6:30, and I get 4:30 on my list.
> 
> Is it just me, or is this a limitation of the time datatype in mysql,  
> obviously all the datetime conversions work perfectly, like in my  
> timestamps…
> 
> Any help would be greatly appreciated.

Hi, what’s goal or what are you trying to accomplish? Where’s a list of  
actions that you performed in script/console? Please provide some code  
snippets if you can.

-Conrad

---

<div class="post-metadata">

**Author:** ![sclarke](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b19c9b/32.png) [@sclarke](https://www.ruby-forum.com/u/sclarke)\
**Post date:** [September 12, 2008, 12:00pm UTC](https://www.ruby-forum.com/t/time-value-wont-come-back-from-utc/148331/3 "2008-09-12T12:00:50Z")

</div>

On 11 Sep 2008, at 18:42, Stuart C. wrote:

> but when I display it again, it stays at the UTC value, i.e. I enter  
> in 6:30, and I get 4:30 on my list.

Related to  
[http://rails.lighthouseapp.com/projects/8994/tickets/1030-multiparameter-attributes-incorrectly-do-time-zone-conversion-on-time-only-columns](http://rails.lighthouseapp.com/projects/8994/tickets/1030-multiparameter-attributes-incorrectly-do-time-zone-conversion-on-time-only-columns)  
maybe ?

Fred
