Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…te_time@351 20afb1e0-9c0e-0410-9884-91ed27886737
  • Loading branch information
jonathan committed Oct 26, 2007
1 parent fc98209 commit 96e7a22
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/parser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def string_to_date(value)
def string_to_dummy_time(value)
return if value.blank?
return value if value.is_a?(Time) || value.is_a?(DateTime)
return value.to_time if value.is_a?(Date)
return value.to_time(ActiveRecord::Base.default_timezone) if value.is_a?(Date)

hour, minute, second = case value.strip
# 12 hours with minute and second
Expand All @@ -57,7 +57,7 @@ def string_to_dummy_time(value)
def string_to_time(value)
return if value.blank?
return value if value.is_a?(Time) || value.is_a?(DateTime)
return value.to_time if value.is_a?(Date)
return value.to_time(ActiveRecord::Base.default_timezone) if value.is_a?(Date)

value = value.strip

Expand Down

0 comments on commit 96e7a22

Please sign in to comment.