[Jifty-commit] r6586 - in jifty/trunk: lib/Jifty
Jifty commits
jifty-commit at lists.jifty.org
Mon Mar 16 16:58:30 EDT 2009
Author: sartak
Date: Mon Mar 16 16:58:29 2009
New Revision: 6586
Modified:
jifty/trunk/ (props changed)
jifty/trunk/lib/Jifty/DateTime.pm
Log:
r81193 at onn: sartak | 2009-03-16 16:58:11 -0400
DateTime's own code assumes input time zone == output time zone, so if the user passes in time_zone we need to set the output time zone
Modified: jifty/trunk/lib/Jifty/DateTime.pm
==============================================================================
--- jifty/trunk/lib/Jifty/DateTime.pm (original)
+++ jifty/trunk/lib/Jifty/DateTime.pm Mon Mar 16 16:58:29 2009
@@ -73,12 +73,15 @@
# user then set the time zone.
$self->current_user($current_user);
+ if ($args{time_zone}) {
+ $self->set_time_zone($args{time_zone});
+ }
# If we were given a date, then we need to make sure its output time zone
# is Floating and it's set to 00:00:00.
# This sucks when you want a timestamp (not just a datestamp) at midnight
# in the floating time zone but we don't have any better way to make this
# work.
- if ($is_date) {
+ elsif ($is_date) {
$self->set_time_zone('floating');
# Without this check we loop infinitely, because set_hour constructs
More information about the Jifty-commit
mailing list