[jifty-devel] Small but potentially test-breaking change to Jifty::DateTime

Shawn M Moore sartak at bestpractical.com
Fri Aug 31 17:46:04 EDT 2007

Hi gang,

I just commited a change that slightly modifies how Jifty::DateTime is
constructed. Ordinarily Jifty::DateTime objects are automatically set to
the current_user's timezone. The change causes a Jifty::DateTime object
to be put into the floating timezone if it looks like a date. This is
consistent with the behavior of new_from_string.

The reason for this change is Jifty::DBI does not store any kind of time
information when filtered through Jifty::DBI::Filter::Date. DateTime
defaults to midnight, so applying a time zone from the western
hemisphere causes the date to be set (by Jifty::DateTime) to one day

Using the floating time zone makes dates more round-trip resilient. I do
feel this is ultimately the right behavior. Well, abolishing time zones
would feel a lot better!

Hopefully this doesn't break any apps. If it does feel free to thwack
me. :)


More information about the jifty-devel mailing list