# Date/Time problems on Windows

**URL:** <https://www.ruby-forum.com/t/date-time-problems-on-windows/167802>\
**Category:** Rails\
**Created:** [May 12, 2009, 7:06pm UTC](https://www.ruby-forum.com/t/date-time-problems-on-windows/167802 "2009-05-12T19:06:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Piers\_Denney](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/e36b37/32.png) [@Piers\_Denney](https://www.ruby-forum.com/u/Piers_Denney)\
**Post date:** [May 12, 2009, 7:06pm UTC](https://www.ruby-forum.com/t/date-time-problems-on-windows/167802/1 "2009-05-12T19:06:55Z")

</div>

Hi All,

I have a system running on Win Server2003 and SqlServer 2008.

Machine is set to GMT-6 for its timezone i.e Central Time with  
Daylight Savings enabled.

When I add records, the time shown in the fields is shown in UTC - as  
its the current time +5 hours. The times stored in the DB are as  
entered (I checked in SQL) in UTC. When the records are retrieved then  
get another 5 hours added to them, as if they were stored in local  
time.

The environment.rb file shows:

```
 config.time_zone = 'UTC'

```

I dont care if the records are stored in UTC or not, but this wacked  
out date handling is killing the users as its so confusing. Any ideas/  
solutions?

Many thanks in advance

---

<div class="post-metadata">

**Author:** ![Piers\_Denney](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/e36b37/32.png) [@Piers\_Denney](https://www.ruby-forum.com/u/Piers_Denney)\
**Post date:** [May 12, 2009, 10:30pm UTC](https://www.ruby-forum.com/t/date-time-problems-on-windows/167802/2 "2009-05-12T22:30:43Z")

</div>

may the ‘rake time:zones:local’ will help you.  
replace to one of that result.
