diff options
author | Xavier Noria <fxn@hashref.com> | 2014-02-18 09:35:11 +0100 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2014-02-18 09:42:06 +0100 |
commit | 65a7c571050da47ab997a5a07fb9f1e2302bf348 (patch) | |
tree | f56f672c3357bc5cf6f6ee41d2b78a1a5f298816 /guides/source | |
parent | f43083609a0a16f91e5f1cfc98a289a23865aea8 (diff) | |
download | rails-65a7c571050da47ab997a5a07fb9f1e2302bf348.tar.gz rails-65a7c571050da47ab997a5a07fb9f1e2302bf348.tar.bz2 rails-65a7c571050da47ab997a5a07fb9f1e2302bf348.zip |
time helpers honor the application time zone when passed a date
Rails applications are expected to be always aware of the application
time zone.
To be consistent with that contract, we have to assume that a bare
date passed to time helpers is a date in the application time zone,
not in the system time zone. The system time zone is irrelevant, we
should totally ignore it.
For example,
travel_to user.birth_date + 40.years
should make that user be 40th years old regardless of the system
time zone. Without this patch that may not be true.
Diffstat (limited to 'guides/source')
0 files changed, 0 insertions, 0 deletions