Fixing bugs in ActiveSupport::Date (#759) #2225

Merged
merged 0 commits into from Aug 4, 2011

Conversation

Projects
None yet
4 participants
@ghost

ghost commented Jul 23, 2011

There are two issues here:
#1) ActiveSupport::Date current method has a misleading conditional. Time.zone is always returned because config.time_zone is set by default on a project.
#2) ActiveSupport::Date does not override the Date.today method. This means that the core ruby library's .today method is called which may be based off of a different time zone than what's set in config.time_zone.

Submitting a pull request.

Owner

guilleiguaran commented Jul 24, 2011

@Mochaleaf can you set a more descriptive message to the commit? :D

@ghost

ghost commented Jul 24, 2011

Ah, I think most of the dialogue was covered inside of the linked issue: #759

scoz commented Jul 31, 2011

Rails newbie here, this really needs to go through.

Took me way too long to figure out why Date.today and Date.yesterday were returning the same day.

Contributor

dmitriy-kiriyenko commented Jul 31, 2011

+1.

@ghost

ghost commented Aug 4, 2011

Anything else I need to do here to get this pulled?

Contributor

dmitriy-kiriyenko commented Aug 4, 2011

I believe you should remove merge commits. If you wish to update the pull request to the current code, you should rebase and then push origin pull_request_branch --force.

Perhaps it might be better to squash the 2 actual commits.

@ghost ghost merged commit 5b88219 into rails:3-1-stable Aug 4, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment