rails/activesupport/lib/active_support
Andrew White 005d910624 Make Time.zone.parse to work with JavaScript date strings
Chrome, Safari and Firefox serialize Date objects to strings such
as 'Mon May 28 2012 00:00:00 GMT-0700 (PDT)'. When these strings
are parsed the zone is interpreted as 'GMT-0700' which doesn't
exist in the TzInfo list of timezones.

By taking advantage of the improved date/time handling in 1.9.3
we can use `Date._parse` and the `:offset` value which is parsed
correctly.

Three tests were amended to make them pass:

1.  test_parse_with_old_date

    This needed changing to a different value because the original
    value was before EST was adopted so was being changed to a
    LMT (Local Mean Time) value after the change. It didn't before
    because `DateTime` just has offsets from UTC not timezones.

2.  test_parse_should_not_black_out_system_timezone_dst_jump

    Changed the implementation of this test as the stubs were
    dependent on internal implementation details of the test.
    Confirmed that the modified test still failed when the
    implementation of `parse` was restored to pre-#5571.

3.  test_parse_should_black_out_app_timezone_dst_jump

    Ditto.

Closes #5770.
2012-12-01 11:34:21 +00:00
..
cache Padding expires_in by 5 minutes on dalli key write to facilitate :race_condition_ttl working correctly. 2012-10-11 15:46:30 -04:00
concurrency added live responses which can be written and read in separate threads 2012-07-29 21:43:05 -07:00
core_ext Add #seconds_until_end_of_day to DateTime and Time 2012-11-29 06:39:32 +01:00
dependencies add :nodoc: to AS::Autoload#extended [ci skip] 2012-09-14 21:31:49 -05:00
deprecation Make caller attribute in deprecation methods optional 2012-10-30 10:23:41 +08:00
inflector Refactor Inflector#ordinal to avoid converting the number twice 2012-11-04 18:51:47 -02:00
json #as_json isolates options when encoding a hash. Closes #8182 2012-11-12 16:06:08 +01:00
locale Fallback to :en locale instead of handling a constant with defaults 2012-08-11 00:20:19 -03:00
log_subscriber update AS/log_subscriber and AS/multibyte docs [ci skip] 2012-09-14 22:54:39 -05:00
multibyte Revert "Use flat_map { } instead of map {}.flatten" 2012-10-05 12:07:16 -03:00
notifications update AS/notifications and AS/testing docs [ci skip] 2012-09-14 22:57:38 -05:00
testing Properly deprecate #pending from AS::TestCase 2012-11-18 21:34:00 -02:00
values Make Time.zone.parse to work with JavaScript date strings 2012-12-01 11:34:21 +00:00
xml_mini update AS/values and AS/xml_mini docs [ci skip] 2012-09-14 23:02:37 -05:00
all.rb
backtrace_cleaner.rb rename private method to avoid overriding 2012-10-06 00:49:27 -05:00
basic_object.rb Remove deprecation from AS::Deprecation behavior, some minor cleanups 2012-03-16 09:01:48 -03:00
benchmarkable.rb Make caller attribute in deprecation methods optional 2012-10-30 10:23:41 +08:00
buffered_logger.rb remove unused requires 2012-01-18 05:01:09 +03:00
builder.rb
cache.rb pass the key to the block in cache.fetch on misses 2012-10-23 00:04:42 -07:00
callbacks.rb Make caller attribute in deprecation methods optional 2012-10-30 10:23:41 +08:00
concern.rb Fix another AS::Concern example (class_eval is already called by included) 2012-11-15 19:18:04 +01:00
configurable.rb Merge branch 'master' of github.com:lifo/docrails 2012-09-21 22:49:20 +05:30
core_ext.rb * BufferedLogger is deprecated. Use ActiveSupport::Logger, or the logger 2011-12-19 18:41:37 -08:00
dependencies.rb prevent Dependencies#remove_const from autoloading parents [fixes #8301] 2012-11-28 00:13:14 +01:00
deprecation.rb explains why these requires are in an unusual place 2012-10-07 11:52:47 +02:00
descendants_tracker.rb Make DescendantsTracker thread safe and optimize the #descendants method. 2012-10-18 12:08:01 -07:00
duration.rb update AS docs [ci skip] 2012-09-17 00:22:18 -05:00
file_update_checker.rb update AS docs [ci skip] 2012-09-17 00:22:18 -05:00
file_watcher.rb
gzip.rb add example to AS::Gzip 2012-06-04 23:43:43 -05:00
hash_with_indifferent_access.rb Implement replace method so key? works correctly. 2012-10-26 11:36:35 -06:00
i18n_railtie.rb update AS docs [ci skip] 2012-09-17 00:22:18 -05:00
i18n.rb require active_support/lazy_load_hooks where is needed 2012-05-22 11:33:03 -03:00
inflections.rb Make ActiveSupport::Inflector locale aware and multilingual 2012-07-30 21:49:18 -07:00
inflector.rb
json.rb
key_generator.rb Add docs for CachingKeyGenerator 2012-11-15 23:06:44 -02:00
lazy_load_hooks.rb update AS docs [ci skip] 2012-09-17 00:22:18 -05:00
log_subscriber.rb update AS docs [ci skip] 2012-09-17 00:22:18 -05:00
logger.rb update AS docs [ci skip] 2012-09-17 00:22:18 -05:00
message_encryptor.rb Add cookie.encrypted which returns an EncryptedCookieJar 2012-11-03 14:57:53 -02:00
message_verifier.rb update AS docs [ci skip] 2012-09-17 00:22:18 -05:00
multibyte.rb update AS docs [ci skip] 2012-09-17 00:22:18 -05:00
notifications.rb 1.9 hash syntax in activesupport 2012-11-10 22:15:13 +02:00
number_helper.rb update some AS code examples to 1.9 hash syntax [ci skip] 2012-09-12 13:47:49 -05:00
option_merger.rb
ordered_hash.rb update AS:OrderedHash docs 2012-05-16 14:44:57 -05:00
ordered_options.rb update AS docs [ci skip] 2012-09-17 00:22:18 -05:00
queueing.rb Fix queueing tests that should be consuming the queue rather than draining it 2012-10-26 19:11:19 -07:00
rails.rb removes usage of Object#in? from the code base (the method remains defined by Active Support) 2012-08-06 00:30:02 +02:00
railtie.rb Merge branch 'master' of github.com:lifo/docrails 2012-09-21 22:49:20 +05:30
rescuable.rb update some AS code examples to 1.9 hash syntax [ci skip] 2012-09-12 13:47:49 -05:00
string_inquirer.rb update AS docs [ci skip] 2012-09-17 00:22:18 -05:00
tagged_logging.rb Allow wrapping a logger that hasn't set a formatter. Default to our SimpleFormatter. Otherwise we try extending nil with the tagging API. 2012-09-26 11:17:02 -07:00
test_case.rb Revert "Merge pull request #4575 from carlosantoniodasilva/remove-test-pending" 2012-11-18 21:34:00 -02:00
time_with_zone.rb Merge branch 'master' of github.com:lifo/docrails 2012-09-21 22:49:20 +05:30
time.rb Removed ActiveSupport#load_all! 2012-03-18 11:24:04 -07:00
version.rb rails/master is now 4.0.0.beta and will only support Ruby 1.9.3+ 2011-12-20 09:30:37 -06:00
xml_mini.rb Make XmlMini.with_backend usable with threads 2012-11-15 20:23:05 +04:00