aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/core_ext/time_with_zone_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* respect nsec in TimeWithZoneVasiliy Ermolovich + Sergey Nartimov2012-05-181-0/+8
| | | | | | | | | | | when we pass fractional usec to Time methods we should use Rational instead of Float because of accuracy problem Time.local(2011,6,12,23,59,59,999999.999).nsec # => 999999998 Time.local(2011,6,12,23,59,59,Rational(999999999, 1000)).nsec # => 999999999
* Merge pull request #6169 from marcandre/respond_to_missingJosé Valim2012-05-051-0/+1
|\ | | | | Respond to missing
| * Use respond_to_missing for TimeWithZoneMarc-Andre Lafortune2012-05-051-0/+1
| |
* | Merge pull request #6156 from mjtko/feature-beginning_of_hourJeremy Kemper2012-05-041-0/+14
|\ \ | | | | | | Beginning and end of hour support for Time and DateTime
| * | added beginning_of_hour support to core_ext calculations for Time and DateTimeMark J. Titorenko2012-05-041-0/+14
| |/
* / enable tests for beginning_of_* and end_of_* within time zone tests; enable ↵Mark J. Titorenko2012-05-041-8/+8
|/ | | | test for future_with_time_current_as_time_with_zone; fix beginning_of_month test.
* use AS::TestCase as the base classAaron Patterson2012-01-051-2/+2
|
* Initial pass at removing dead 1.8.x code from Active Support.José Valim2011-12-201-2/+1
| | | | | | There are a bunch of other implicit branches that adds 1.8.x specific code that still needs to be removed. Pull requests for those cases are welcome.
* Fix inconsistencies with Time{WithZone}#{hash,eql?}Marc-Andre Lafortune2011-11-221-2/+9
|
* Fix xmlschema output with fraction_digits >0shtirlic2011-07-111-0/+7
| | | | | Current implementation produce incorrect output when Time#usec returns integer < 100000, because to_s doesn't add leading zeros.
* added find_zone and find_zone! to AS timezones and changed the AS Railtie to ↵Josh Kalderimis2011-04-051-0/+18
| | | | | | use find_zone! as well as adding Railtie tests Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* Raise on invalid timezoneMarc-Andre Lafortune2011-04-051-5/+26
| | | | Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* updated Time, Date and DateTime current methods in AS to use Time.zone and ↵Josh Kalderimis2011-02-281-7/+8
| | | | | | not Time.zone_default. [#6410 state:committed]
* prefering psych as the yaml parser if possible, fixing assertions for YAML ↵Aaron Patterson2011-01-211-2/+2
| | | | 1.1 compatibility
* make our yaml output consistentAaron Patterson2011-01-041-1/+1
|
* Fix ActiveSupport::TimeWithZone#localtime method with DateTimeAlvaro Bautista2010-11-111-0/+11
| | | | | | [#5344 state:committed] Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* Deletes trailing whitespaces (over text files only find * -type f -exec sed ↵Santiago Pastorino2010-08-141-3/+3
| | | | 's/[ \t]*$//' -i {} \;)
* Don't store incorrect values in zones_mapSantiago Pastorino2010-06-281-3/+1
| | | | | | [#4942 state:committed] Signed-off-by: José Valim <jose.valim@gmail.com>
* when the timezone is nil, a TimeWithZone object should not be constructed. ↵Aaron Patterson2010-06-171-0/+7
| | | | | | [#4881 state:resolved] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Fix test incorrectly using a bare assert to use assert_kind_ofSantiago Pastorino2010-05-241-1/+1
| | | | Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Final iteration of use better testing methodsNeeraj Singh2010-05-191-6/+6
| | | | | | [#4652 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Switch to TimezoneProxy for later support of deferred TZ loadingJeremy Kemper2010-04-201-2/+5
|
* 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
|