Geoff Buesing
|
54ccdd3343
|
Time, DateTime and TimeWithZone #in_time_zone defaults to Time.zone. 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
|
2008-03-17 05:50:13 +00:00 |
|
Geoff Buesing
|
2366fdbdb1
|
Adding TimeZone#parse
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9045 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
|
2008-03-17 05:07:50 +00:00 |
|
Geoff Buesing
|
b132413885
|
Adding TimeZone#at and DateTime#to_f
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9042 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
|
2008-03-17 03:45:32 +00:00 |
|
Geoff Buesing
|
895487c122
|
TimeWithZone responds to Ruby 1.9 weekday-named query methods
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9041 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
|
2008-03-17 02:54:23 +00:00 |
|
Geoff Buesing
|
77ee522bf6
|
TimeWithZone caches TZInfo::TimezonePeriod used for time conversion so that 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
|
2008-03-17 02:40:28 +00:00 |
|
David Heinemeier Hansson
|
13ab55f737
|
Fixed that BufferedLogger should create its own directory if one doesnt already exist (closes #11285) [lotswholetime]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9013 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
|
2008-03-13 01:54:34 +00:00 |
|
Geoff Buesing
|
5483de0cc3
|
Fix Numeric time tests broken by DST change by anchoring them to fixed times instead of Time.now. Anchor TimeZone#now DST test to time specified with Time.at instead of Time.local to work around platform differences with Time.local and DST representation
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9009 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
|
2008-03-11 07:19:36 +00:00 |
|
Geoff Buesing
|
3af5b27839
|
Removing unneeded #change_time_zone method from Time, DateTime and TimeWithZone
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9008 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
|
2008-03-11 06:23:41 +00:00 |
|
Geoff Buesing
|
ba91fddc44
|
TimeZone #local and #now correctly enforce DST rules
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9007 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
|
2008-03-11 05:39:13 +00:00 |
|
Geoff Buesing
|
52b57c662c
|
TimeWithZone instances correctly enforce DST rules. Adding TimeZone#period_for_utc
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9006 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
|
2008-03-11 04:26:20 +00:00 |
|
Geoff Buesing
|
f56c25d7b4
|
test_time_with_datetime_fallback expects DateTime.local_offset instead of DateTime.now.offset
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9002 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
|
2008-03-10 03:37:38 +00:00 |
|
Geoff Buesing
|
10d9d0b6fe
|
Adding TimeWithZone #marshal_dump and #marshal_load
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8975 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
|
2008-03-03 03:49:37 +00:00 |
|
Michael Koziarski
|
42d1172c2d
|
Add OrderedHash#to_hash. Closes #11266 [josh]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8974 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
|
2008-03-03 03:31:57 +00:00 |
|
Jeremy Kemper
|
3582bce6fd
|
Adding Time#end_of_day, _quarter, _week, and _year. Closes #9312.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8934 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
|
2008-02-27 22:53:54 +00:00 |
|
Geoff Buesing
|
4a643f686a
|
Adding TimeWithZone#between?
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8886 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
|
2008-02-17 00:35:49 +00:00 |
|
Geoff Buesing
|
25e139e545
|
Time.=== returns true for TimeWithZone instances
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8885 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
|
2008-02-16 23:39:40 +00:00 |
|
Geoff Buesing
|
e7ebd656b3
|
TimeWithZone #+ and #- behave consistently with numeric arguments regardless 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
|
2008-02-16 23:15:59 +00:00 |
|
Michael Koziarski
|
4ff26f51f6
|
Add String#squish and String#squish! to remove consecutive chunks of whitespace. Closes #11123 [jordi, Henrik N]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8878 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
|
2008-02-16 00:02:30 +00:00 |
|
Michael Koziarski
|
191ffc9456
|
Serialize BigDecimals as Floats when using to_yaml. Closes #8746 [ernesto.jimenez]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8877 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
|
2008-02-15 23:33:43 +00:00 |
|
Geoff Buesing
|
6608a3ef37
|
Adding TimeWithZone #to_yaml, #to_datetime, #eql? and method aliases for duck-typing compatibility with Time
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8854 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
|
2008-02-10 22:26:16 +00:00 |
|
Geoff Buesing
|
8ad5a29cef
|
TimeWithZone #in_time_zone returns +self+ if zone argument is the same as #time_zone
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8853 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
|
2008-02-10 20:35:47 +00:00 |
|
Geoff Buesing
|
8831180b15
|
Adding TimeWithZone #to_a, #to_f, #to_i, #httpdate, #rfc2822
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8852 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
|
2008-02-10 20:04:14 +00:00 |
|
Geoff Buesing
|
b9be374ddd
|
Time#zone=, #in_time_zone and #change_time_zone accept a Duration
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8850 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
|
2008-02-10 19:02:30 +00:00 |
|
Geoff Buesing
|
db4fc6f206
|
Time#in_time_zone handles Time.local instances correctly
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8849 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
|
2008-02-10 18:45:55 +00:00 |
|
Geoff Buesing
|
521714a39d
|
Pruning unneeded Time#change_time_zone_to_current. Enhanced docs for #change_time_zone
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8848 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
|
2008-02-10 18:20:37 +00:00 |
|
Geoff Buesing
|
94fa9fb745
|
TimeZone#new renamed #local, so that new TimeWithZone instances can be created via Time.zone.local()
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8847 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
|
2008-02-10 17:02:22 +00:00 |
|
Jeremy Kemper
|
3335bd12c8
|
ActiveSupport::Base64.encode64s since Base64 is deprecated
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8817 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
|
2008-02-07 21:50:46 +00:00 |
|
David Heinemeier Hansson
|
fbd7ec3c9f
|
Added Base64.encode64s to encode values in base64 without the newlines. This makes the values immediately usable as URL parameters or memcache keys without further processing [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8816 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
|
2008-02-07 21:09:23 +00:00 |
|
Rick Olson
|
72385a7be6
|
Add Time Zone support to ActiveRecord, and config.time_zone property for specifying a default Time Zone. Closes #10982 [Geoff Buesing, rick]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8806 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
|
2008-02-06 06:43:02 +00:00 |
|
Jeremy Kemper
|
7fe2ad7279
|
Ruby 1.9 compat: declare utf-8 file encoding
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8789 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
|
2008-02-02 22:52:32 +00:00 |
|
Jeremy Kemper
|
e59de6046c
|
Add a handful of cache store tests
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8764 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
|
2008-02-01 01:43:47 +00:00 |
|
Rick Olson
|
bd72d06374
|
Support retrieving TimeZones with a Duration. TimeZone[-28800] == TimeZone[-480.minutes]. [rick]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8746 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
|
2008-01-29 01:09:49 +00:00 |
|
Geoff Buesing
|
8ef3dfff7a
|
TimeWithZone#- added, so that #- can handle a Time or TimeWithZone argument correctly
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8732 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
|
2008-01-26 00:34:44 +00:00 |
|
Geoff Buesing
|
c95365a00e
|
with_timezone test helper renamed with_env_tz, to distinguish between setting ENV['TZ'] and setting Time.zone in tests
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8731 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
|
2008-01-26 00:11:59 +00:00 |
|
Geoff Buesing
|
dad3e835f7
|
Time#- coerces TimeWithZone argument to a Time instance so that difference 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
|
2008-01-25 23:55:07 +00:00 |
|
Geoff Buesing
|
4b2ac708b7
|
Adding UTC zone to TimeZone; TimeWithZone no longer has to fake UTC zone with nil
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8720 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
|
2008-01-25 18:23:22 +00:00 |
|
Geoff Buesing
|
c911e1ac08
|
Time.zone uses thread-local variable for thread safety. Adding 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
|
2008-01-25 15:52:23 +00:00 |
|
Geoff Buesing
|
2168178bdb
|
TimeZone#to_s uses UTC rather than GMT; reapplying change that was undone in [8679]. References #1689
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8716 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
|
2008-01-25 03:54:10 +00:00 |
|
Geoff Buesing
|
8f7232bc76
|
Time.days_in_month defaults to current year if no year is supplied as argument, uses Date.gregorian_leap? to determine leap year, and uses constant lookup to determine days in month. Closes #10799 [Radar]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8715 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
|
2008-01-25 03:29:20 +00:00 |
|
Geoff Buesing
|
ac03ad1f78
|
Adding Time and DateTime #compare_with_coercion, which layers behavior on #<=> 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
|
2008-01-23 22:22:36 +00:00 |
|
Geoff Buesing
|
213fac6f49
|
TimeZone#now returns an ActiveSupport::TimeWithZone
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8710 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
|
2008-01-23 20:49:53 +00:00 |
|
Geoff Buesing
|
cb8de22dfb
|
Time #in_current_time_zone and #change_time_zone_to_current return self when Time.zone is nil
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8708 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
|
2008-01-23 18:49:54 +00:00 |
|
Jeremy Kemper
|
8273280a63
|
Enumerable#group_by uses ActiveSupport::OrderedHash
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8700 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
|
2008-01-23 07:25:20 +00:00 |
|
Geoff Buesing
|
abb24b484f
|
Adding Time and DateTime #formatted_offset, for outputting +HH:MM utc offset strings with cross-platform consistency
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8698 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
|
2008-01-23 02:46:47 +00:00 |
|
Geoff Buesing
|
2e7b2f0344
|
Adding alternate_utc_string option to TimeZone#formatted_offset. Removing unneeded TimeZone#offset
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8697 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
|
2008-01-23 02:11:00 +00:00 |
|
Geoff Buesing
|
022d9f7ce6
|
Introduce ActiveSupport::TimeWithZone, for wrapping Time instances with a 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
|
2008-01-23 01:56:22 +00:00 |
|
Geoff Buesing
|
1d4f4cdfe2
|
Replace non-dst-aware TimeZone class with dst-aware class from tzinfo_timezone plugin. TimeZone#adjust and #unadjust are no longer available; tzinfo gem must now be present in order to perform time zone calculations, via #local_to_utc and #utc_to_local methods.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8679 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
|
2008-01-21 03:55:54 +00:00 |
|
Jeremy Kemper
|
aae37bb4f7
|
Extract ActiveSupport::Callbacks from Active Record, test case setup and teardown, and ActionController::Dispatcher. Closes #10727.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8664 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
|
2008-01-19 02:44:45 +00:00 |
|
Geoff Buesing
|
47ff3aa91f
|
Introducing DateTime #utc, #utc? and #utc_offset, for duck-typing compatibility with Time. Closes #10002
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8649 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
|
2008-01-16 20:07:10 +00:00 |
|
Geoff Buesing
|
e9dad7496d
|
Refactor number-to-HH:MM-string conversion logic from TimeZone#formatted_offset to reusable Numeric#to_utc_offset_s method
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8635 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
|
2008-01-12 20:44:31 +00:00 |
|