aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/core_ext/time_with_zone_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* Ensure test sets json time format flagJeremy Kemper2010-01-281-1/+4
|
* Add test for TimeWithZone#to_i with wrapped DateTimeGeoff Buesing2009-12-151-0/+6
|
* Pull in time extensions alsoJeremy Kemper2009-06-051-1/+1
|
* Work around Float faux precisionJeremy Kemper2009-04-301-1/+1
|
* * Add pluggable JSON backends with support for the JSON gem. [rick]rick2009-04-231-2/+2
| | | | | | | | | | | | | | 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-0/+1
|
* Merge branch 'master' into cherryJeremy Kemper2009-04-201-0/+4
|\ | | | | | | | | | | | | | | | | | | | | 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
| * TimeWithZone.name returns 'Time', to further thwart type checkingGeoff Buesing2009-04-051-0/+4
| |
* | Explicit test dependenciesJeremy Kemper2009-03-281-0/+1
|/
* Ruby 1.9 compat: rename deprecated assert_raises to assert_raise.Jeremy Kemper2009-03-081-1/+1
| | | | [#1617 state:resolved]
* Remove obsolete silence_warnings wrappers from TZInfo-dependent tests in ↵Levin Alexander2009-02-141-254/+162
| | | | ActiveSupport [#1914 state:resolved]
* Make TimeWithZone#to_formatted_s an alias to TimeWithZone#to_s [#1796 ↵Levin Alexander2009-02-081-0/+6
| | | | state:resolved]
* TimeWithZone#xmlschema accepts optional fraction_digits argument [#1725 ↵Nicholas Dainty2009-01-111-0/+9
| | | | state:resolved]
* TimeWithZone#- gives correct result with wrapped DateTime, and with DateTime ↵gbuesing2009-01-041-0/+9
| | | | argument
* Require mocha >= 0.9.0 for AS testsJeremy Kemper2008-11-221-72/+66
|
* TimeWithZone#freeze: preload instance variables so that we can actually freezegbuesing2008-10-191-0/+13
|
* TimeWithZone #wday, #yday and #to_date avoid trip through #method_missinggbuesing2008-09-141-1/+3
|
* Add thorough tests for Time-object #past?, #future? and #today. Fix ↵gbuesing2008-09-141-10/+49
| | | | 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-9/+22
| | | | classes to facilitate Date/Time comparisons.
* Fix TimeWithZone unmarshaling: coerce unmarshaled Time instances to utc, ↵gbuesing2008-07-141-0/+6
| | | | because Ruby's marshaling of Time instances doesn't respect the zone
* TimeWithZone: when crossing DST boundary, treat Durations of days, months or ↵gbuesing2008-06-291-0/+168
| | | | 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.
* Wrap date part value method tests inside a uses mocha block.Joshua Peek2008-06-071-16/+18
|
* Namespace Inflector, Dependencies, OrderedOptions, and TimeZone under ↵Joshua Peek2008-06-031-120/+120
| | | | ActiveSupport [#238 state:resolved]
* TimeWithZone #+ and #- : ensure overflow to DateTime with Numeric arggbuesing2008-05-181-0/+7
|
* 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-1/+9
| | | | class; no longer relying on method_missing
* Duration #since and #ago with no argument (e.g., 5.days.ago) return ↵gbuesing2008-04-201-0/+24
| | | | TimeWithZone when config.time_zone is set. Introducing Time.current, which returns Time.zone.now if config.time_zone is set, otherwise just returns Time.now
* TimeWithZone respects config.active_support.use_standard_json_time_formatgbuesing2008-04-121-0/+7
|
* TimeWithZone: Adding tests for dst and leap day edge cases when advancing timeGeoff Buesing2008-04-021-0/+35
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9213 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* TimeWithZone#method_missing: send to utc to advance with dst correctness, ↵Geoff Buesing2008-04-021-0/+63
| | | | | | 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
* Removing unnecessary uses_tzinfo helper from tests, given that TZInfo is now ↵Geoff Buesing2008-03-301-456/+453
| | | | | | bundled git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9150 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Ensure threads finish running for time zone thread safety test.Josh Peek2008-03-291-2/+4
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9136 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* config.time_zone and TimeWithZone#marshal_load accept tzinfo/Olson identifiersGeoff Buesing2008-03-281-0/+11
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9108 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Time.zone= accepts TZInfo::Timezone instances and Olson identifiers; wraps ↵Geoff Buesing2008-03-281-0/+28
| | | | | | result in TimeZone instance git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9107 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* TimeWithZone time conversions don't need to be wrapped in TimeOrDateTime, ↵Geoff Buesing2008-03-281-0/+12
| | | | | | 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-0/+7
| | | | 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-0/+6
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9081 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Ensure correct TimeWithZone#to_dateGeoff Buesing2008-03-221-0/+13
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9079 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Make TimeWithZone work with tzinfo 0.2.x: use ↵Geoff Buesing2008-03-211-80/+138
| | | | | | TZInfo::Timezone#zone_identifier alias for #abbreviation, silence warnings on tests. Raise LoadError when TZInfo version is < 0.2 by sniffing for TZInfo::TimeOrDateTime constant. Move all tzinfo-dependent TimeZone tests into uses_tzinfo block git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9071 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Time, DateTime and TimeWithZone #in_time_zone defaults to Time.zone. ↵Geoff Buesing2008-03-171-25/+25
| | | | | | Removing now unneeded #in_current_time_zone. ActiveRecord time zone aware attributes updated to use #in_time_zone git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9047 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* TimeWithZone responds to Ruby 1.9 weekday-named query methodsGeoff Buesing2008-03-171-0/+7
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9041 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* TimeWithZone caches TZInfo::TimezonePeriod used for time conversion so that ↵Geoff Buesing2008-03-171-0/+25
| | | | | | it can be reused, and enforces DST rules correctly when instance is created from a local time git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9040 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Removing unneeded #change_time_zone method from Time, DateTime and TimeWithZoneGeoff Buesing2008-03-111-31/+15
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9008 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* TimeWithZone instances correctly enforce DST rules. Adding ↵Geoff Buesing2008-03-111-3/+40
| | | | | | TimeZone#period_for_utc git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9006 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Adding TimeWithZone #marshal_dump and #marshal_loadGeoff Buesing2008-03-031-0/+8
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8975 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Adding TimeWithZone#between?Geoff Buesing2008-02-171-0/+5
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8886 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* TimeWithZone #+ and #- behave consistently with numeric arguments regardless ↵Geoff Buesing2008-02-161-2/+20
| | | | | | of whether wrapped time is a Time or DateTime; consistenty answers false to #acts_like?(:date) git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8884 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Adding TimeWithZone #to_yaml, #to_datetime, #eql? and method aliases for ↵Geoff Buesing2008-02-101-0/+13
| | | | | | duck-typing compatibility with Time git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8854 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* TimeWithZone #in_time_zone returns +self+ if zone argument is the same as ↵Geoff Buesing2008-02-101-0/+4
| | | | | | #time_zone git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8853 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Adding TimeWithZone #to_a, #to_f, #to_i, #httpdate, #rfc2822Geoff Buesing2008-02-101-0/+24
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8852 5ecf4fe2-1ee6-0310-87b1-e25e094e27de