aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/time_with_zone.rb
Commit message (Collapse)AuthorAgeFilesLines
* JSON: split encoding and coercionJeremy Kemper2009-06-081-20/+21
|
* Now that we have a separate internal rails_to_json, use a separate circular ↵Jeremy Kemper2009-04-261-1/+1
| | | | reference stack instead of sticking it in the options hash
* Privatize rails_to_jsonJeremy Kemper2009-04-261-22/+20
|
* * Add pluggable JSON backends with support for the JSON gem. [rick]rick2009-04-231-1/+3
| | | | | | | | | | | | | | Example: ActiveSupport::JSON.backend = "JSONGem" All internal Rails JSON encoding is now handled by ActiveSupport::JSON.encode(). Use of #to_json is not recommended, as it may clash with other libraries that overwrite it. However, you can recover Rails specific functionality if you really want to use #to_json. gem 'json' ActiveSupport::JSON.backend = "JSONGem" class ActiveRecord::Base alias to_json rails_to_json end
* Fix dependencies revealed by testing in isolationJeremy Kemper2009-04-221-1/+1
|
* Divert CoreExtensions mention in docsJeremy Kemper2009-04-221-1/+1
|
* Merge branch 'master' into cherryJeremy Kemper2009-04-201-4/+9
|\ | | | | | | | | | | | | | | | | | | | | Conflicts: activesupport/CHANGELOG activesupport/lib/active_support/core_ext/class/delegating_attributes.rb activesupport/lib/active_support/core_ext/hash/conversions.rb activesupport/lib/active_support/core_ext/module/attribute_accessors.rb activesupport/lib/active_support/core_ext/string/multibyte.rb activesupport/lib/active_support/core_ext/time/calculations.rb activesupport/lib/active_support/deprecation.rb
| * Bring abstract_controller up to date with rails/masterCarl Lerche & Yehuda Katz2009-04-131-2/+8
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Resolved all the conflicts since 2.3.0 -> HEAD. Following is a list of commits that could not be applied cleanly or are obviated with the abstract_controller refactor. They all need to be revisited to ensure that fixes made in 2.3 do not reappear in 3.0: 2259ecf368e6a6715966f69216e3ee86bf1a82a7 AR not available * This will be reimplemented with ActionORM or equivalent 06182ea02e92afad579998aa80144588e8865ac3 implicitly rendering a js response should not use the default layout [#1844 state:resolved] * This will be handled generically 893e9eb99504705419ad6edac14d00e71cef5f12 Improve view rendering performance in development mode and reinstate template recompiling in production [#1909 state:resolved] * We will need to reimplement rails-dev-boost on top of the refactor; the changes here are very implementation specific and cannot be cleanly applied. The following commits are implicated: 199e750d46c04970b5e7684998d09405648ecbd4 3942cb406e1d5db0ac00e03153809cc8dc4cc4db f8ea9f85d4f1e3e6f3b5d895bef6b013aa4b0690 e3b166aab37ddc2fbab030b146eb61713b91bf55 ae9f258e03c9fd5088da12c1c6cd216cc89a01f7 44423126c6f6133a1d9cf1d0832b527e8711d40f 0cb020b4d6d838025859bd60fb8151c8e21b8e84 workaround for picking layouts based on wrong view_paths [#1974 state:resolved] * The specifics of this commit no longer apply. Since it is a two-line commit, we will reimplement this change. 8c5cc66a831aadb159f3daaffa4208064c30af0e make action_controller/layouts pick templates from the current instance's view_paths instead of the class view_paths [#1974 state:resolved] * This does not apply at all. It should be trivial to apply the feature to the reimplemented ActionController::Base. 87e8b162463f13bd50d27398f020769460a770e3 fix HTML fallback for explicit templates [#2052 state:resolved] * There were a number of patches related to this that simply compounded each other. Basically none of them apply cleanly, and the underlying issue needs to be revisited. After discussing the underlying problem with Koz, we will defer these fixes for further discussion.
| | * TimeWithZone.name returns 'Time', to further thwart type checkingGeoff Buesing2009-04-051-0/+5
| | |
| * | Sync 'rails/rails/master'Yehuda Katz2009-01-301-1/+1
| |\ \
| * \ \ Sync 'rails/rails/master'Yehuda Katz2009-01-111-2/+6
| |\ \ \
| * | | | Sync 'rails/rails/master'Yehuda Katz2009-01-051-1/+1
| | | | |
| * | | | Annotated metaprogramming code across ActiveSupportMichael S. Klishin2008-12-281-4/+4
| | | | |
* | | | | Unneeded requireJeremy Kemper2009-04-071-1/+0
| | | | |
* | | | | Explicit dependency on Duration, numeric times, and date/time to_s extensionsJeremy Kemper2009-03-281-2/+9
| | | | |
* | | | | Move Numeric#to_utc_offset_s to TimeZone.seconds_to_utc_offsetJeremy Kemper2009-03-231-1/+1
| |_|_|/ |/| | |
* | | | TimeWithZone#advance: leverage Hash#values_at and non-block form of #any? ↵Geoff Buesing2009-02-091-1/+1
| | | | | | | | | | | | | | | | for a little less line noise, and a slight speedup (thanks raggi and Roman2K)
* | | | TimeWithZone#advance: use #any? instead of #detectGeoff Buesing2009-02-081-1/+1
| | | |
* | | | TimeWithZone: eliminate unnecessary flattenGeoff Buesing2009-02-081-1/+1
| | | |
* | | | TimeWithZone: use Array#any? instead of detect, since we don't care about ↵Geoff Buesing2009-02-081-1/+1
| | | | | | | | | | | | | | | | the block return value
* | | | Make TimeWithZone#to_formatted_s an alias to TimeWithZone#to_s [#1796 ↵Levin Alexander2009-02-081-0/+1
| |_|/ |/| | | | | | | | state:resolved]
* | | Merge docrailsPratik Naik2009-01-181-1/+1
| |/ |/|
* | TimeWithZone#xmlschema accepts optional fraction_digits argument [#1725 ↵Nicholas Dainty2009-01-111-2/+6
| | | | | | | | state:resolved]
* | TimeWithZone#- gives correct result with wrapped DateTime, and with DateTime ↵gbuesing2009-01-041-1/+1
| | | | | | | | argument
* | Inline code comments for class_eval/module_eval [#1657 state:resolved]Xavier Noria2008-12-281-3/+3
|/ | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Lazy-require tzinfo for TimeZoneJeremy Kemper2008-11-231-0/+1
|
* TimeWithZone#freeze: preload instance variables so that we can actually freezegbuesing2008-10-191-2/+2
|
* TimeWithZone #wday, #yday and #to_date avoid trip through #method_missinggbuesing2008-09-141-1/+1
|
* Add thorough tests for Time-object #past?, #future? and #today. Fix ↵gbuesing2008-09-141-1/+1
| | | | TimeWithZone #today? to use #time instead of #utc for date comparison. Update changelog. [#720 state:resolved]
* Introduce convenience methods past?, today? and future? for Date and Time ↵Clemens Kofler2008-09-141-40/+52
| | | | classes to facilitate Date/Time comparisons.
* Get rid of 'Object#send!'. It was originally added because it's in Ruby 1.9, ↵Jeremy Kemper2008-08-311-1/+1
| | | | | | | | | | but it has since been removed from 1.9. Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> Conflicts: actionpack/test/controller/layout_test.rb
* Merge with docrails.Pratik Naik2008-07-161-1/+13
|
* Fix TimeWithZone unmarshaling: coerce unmarshaled Time instances to utc, ↵gbuesing2008-07-141-1/+1
| | | | because Ruby's marshaling of Time instances doesn't respect the zone
* TimeWithZone#advance: treat :weeks option as variable-lengthgbuesing2008-06-291-2/+2
|
* TimeWithZone: when crossing DST boundary, treat Durations of days, months or ↵gbuesing2008-06-291-12/+33
| | | | years as variable-length, and all other values as absolute length. A time + 24.hours will advance exactly 24 hours, but a time + 1.day will advance 23-25 hours, depending on the day. Ensure consistent behavior across all advancing methods.
* Ruby 1.8.7 compat: TimeWithZone# and Chars#respond_to? pass along the ↵Jeremy Kemper2008-05-311-4/+4
| | | | include_private argument
* Merge docrails.Pratik Naik2008-05-251-17/+17
| | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Adding documentation for time zone featuresgbuesing2008-05-181-1/+28
|
* TimeWithZone #+ and #- : ensure overflow to DateTime with Numeric arggbuesing2008-05-181-2/+2
|
* Include time zone offset in TimeWithZone#to_jsonDaniel Morrison2008-05-131-1/+1
|
* TimeWithZone: date part getter methods (#year #mon #day etc) are defined on ↵gbuesing2008-05-081-0/+8
| | | | class; no longer relying on method_missing
* Improve documentation coverage and markupXavier Noria2008-05-021-6/+7
| | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Refactor TimeWithZone: don't send #since, #ago, #+, #-, #advance through ↵gbuesing2008-04-121-9/+18
| | | | method_missing
* TimeWithZone respects config.active_support.use_standard_json_time_formatgbuesing2008-04-121-1/+5
|
* TimeWithZone#method_missing: send to utc to advance with dst correctness, ↵Geoff Buesing2008-04-021-18/+7
| | | | | | otherwise send to time. Adding tests for time calculations methods git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9208 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Bundling abbreviated version of TZInfo gem 0.3.8: only the classes and zone ↵Geoff Buesing2008-03-301-0/+1
| | | | | | definitions required to support Rails time zone features are included. If a recent version of the full TZInfo gem is installed, this will take precedence over the bundled version git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9149 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* config.time_zone and TimeWithZone#marshal_load accept tzinfo/Olson identifiersGeoff Buesing2008-03-281-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9108 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* TimeWithZone time conversions don't need to be wrapped in TimeOrDateTime, ↵Geoff Buesing2008-03-281-12/+2
| | | | | | because TZInfo does this internally git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9106 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* TimeWithZone#usec returns 0 instead of error when DateTime is wrappedGeoff Buesing2008-03-281-1/+5
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9105 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Ensure that TimeWithZone#to_yaml works when passed a YAML::Emitter. [rick]Rick Olson2008-03-231-1/+5
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9081 5ecf4fe2-1ee6-0310-87b1-e25e094e27de