aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/core_ext/time_with_zone_test.rb
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
* Time#zone=, #in_time_zone and #change_time_zone accept a DurationGeoff Buesing2008-02-101-0/+24
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8850 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Time#in_time_zone handles Time.local instances correctlyGeoff Buesing2008-02-101-0/+17
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8849 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Pruning unneeded Time#change_time_zone_to_current. Enhanced docs for ↵Geoff Buesing2008-02-101-21/+0
| | | | | | #change_time_zone git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8848 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* TimeWithZone#- added, so that #- can handle a Time or TimeWithZone argument ↵Geoff Buesing2008-01-261-0/+1
| | | | | | correctly git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8732 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Time#- coerces TimeWithZone argument to a Time instance so that difference ↵Geoff Buesing2008-01-251-0/+10
| | | | | | in seconds can be calculated. Closes #10914 [Geoff Buesing, yyyc514] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8730 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Adding UTC zone to TimeZone; TimeWithZone no longer has to fake UTC zone ↵Geoff Buesing2008-01-251-6/+10
| | | | | | with nil git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8720 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Time.zone uses thread-local variable for thread safety. Adding ↵Geoff Buesing2008-01-251-24/+38
| | | | | | | | Time.use_zone, for overriding Time.zone locally inside a block. Removing unneeded Time.zone_reset! git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8718 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Adding Time and DateTime #compare_with_coercion, which layers behavior on ↵Geoff Buesing2008-01-231-3/+15
| | | | | | #<=> so that any combination of Time, DateTime and ActiveSupport::TimeWithZone instances can be chronologically compared git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8711 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Time #in_current_time_zone and #change_time_zone_to_current return self when ↵Geoff Buesing2008-01-231-4/+4
| | | | | | Time.zone is nil git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8708 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Introduce ActiveSupport::TimeWithZone, for wrapping Time instances with a ↵Geoff Buesing2008-01-231-0/+212
TimeZone. Introduce instance methods to Time for creating TimeWithZone instances, and class methods for managing a global time zone git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8696 5ecf4fe2-1ee6-0310-87b1-e25e094e27de