#242 ✓resolved
Dan Kubb (dkubb)

DateTime timezone truncation problems

Reported by Dan Kubb (dkubb) | May 4th, 2008 @ 01:55 AM

MySQL does not store timezones for any date, datetime or timestamp fields. The problem is that when you pull the value out of the Database it comes out in the UTC timezone, while the year/month/day/hour/minute/second are the same as the original input. So basically the timezone is changed to UTC.

I'm not precisely sure what the solution is, but I was thinking that the DateTime object should be converted to UTC timezone prior to insertion. That way at least the input and output would be equivalent, and you could always convert the output to the original time zone, to get a precise match.

When I say convert, I mean actually calculate the offset from UTC and add/subtract the right number of minutes from the DateTime object.

I'm not sure if this change should be done at the dm-core or dataobjects layer.

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

People watching this ticket