public
Fork of halorgium/mephisto
Description: A mirror of the mephisto code-base
Homepage: http://mephistoblog.com/
Clone URL: git://github.com/technoweenie/mephisto.git
Search Repo:
Click here to lend your support to: mephisto and make a donation at www.pledgie.com !
revert timezone patches, fix implementation

git-svn-id: http://svn.techno-weenie.net/projects/mephisto/trunk@2050 
567b1171-46fb-0310-a4c9-b4bef9110e78
technoweenie (author)
Mon Sep 04 00:28:36 -0700 2006
commit  697616519d9e38ac1ae7a367340217eb39d73a0d
tree    aa8d796e0796043ca98fa817d2ec04fe6b05546c
parent  26e849d40a5b40cb207afb0809c97062831f6840
...
137
138
139
140
 
141
142
143
...
137
138
139
 
140
141
142
143
0
@@ -137,7 +137,7 @@
0
         date = Time.parse_from_attributes(params[:article], :published_at, :local)
0
         next unless date
0
         params[:article].delete_if { |k, v| k.to_s =~ /^#{:published_at}/ }
0
- params[:article][:published_at] = utc_to_local(date)
0
+ params[:article][:published_at] = local_to_utc(date)
0
       end
0
     end
0
     
...
19
20
21
22
 
23
24
25
...
19
20
21
 
22
23
24
25
0
@@ -19,7 +19,7 @@
0
 # Use this to freeze your deployment to a specific rails version. Uses the rake
0
 # init task run in after_symlink below.
0
 
0
-set :rails_version, 4393
0
+set :rails_version, 4928
0
 
0
 # TODO: test this works and I can remove the restart task and use the cleanup task
0
 # set :use_sudo, false
...
90
91
92
93
 
94
95
96
...
181
182
183
184
 
185
186
187
...
330
331
332
333
 
334
335
336
...
90
91
92
 
93
94
95
96
...
181
182
183
 
184
185
186
187
...
330
331
332
 
333
334
335
336
0
@@ -90,7 +90,7 @@
0
           'published_at(1i)' => '2005', 'published_at(2i)' => '1', 'published_at(3i)' => '1', 'published_at(4i)' => '10' }, :submit => :save
0
         assert_redirected_to :action => 'index'
0
         assert assigns(:article).published?
0
- assert_equal Time.utc(2005, 1, 1, 5, 0, 0), assigns(:article).published_at
0
+ assert_equal Time.local(2005, 1, 1, 9, 0, 0).utc, assigns(:article).published_at
0
         assert !assigns(:article).new_record?
0
         assert_equal users(:quentin), assigns(:article).updater
0
       end
0
@@ -181,7 +181,7 @@
0
       post :update, :id => contents(:welcome).id, :article => { 'published_at(1i)' => '2005', 'published_at(2i)' => '1', 'published_at(3i)' => '1', 'published_at(4i)' => '10' }
0
       assert_redirected_to :action => 'index'
0
       assert assigns(:article).published?
0
- assert_equal Time.utc(2005, 1, 1, 5, 0, 0), assigns(:article).published_at
0
+ assert_equal Time.local(2005, 1, 1, 9, 0, 0).utc, assigns(:article).published_at
0
     end
0
   end
0
 
0
@@ -330,7 +330,7 @@
0
         assert_template 'new'
0
         assert_valid assigns(:article)
0
         assert assigns(:article).new_record?
0
- assert_equal Time.utc(2005, 1, 1, 5, 0, 0), assigns(:article).published_at
0
+ assert_equal Time.local(2005, 1, 1, 9, 0, 0).utc, assigns(:article).published_at
0
         assert_equal users(:quentin), assigns(:article).updater
0
       end
0
     end
...
237
238
239
240
 
241
242
 
243
244
245
...
237
238
239
 
240
241
 
242
243
244
245
0
@@ -237,9 +237,9 @@
0
   end
0
 
0
   def test_should_show_monthly_entries
0
- date = 4.days.ago
0
+ date = Time.now.utc - 4.days
0
     get :month, :year => date.year, :month => date.month
0
- assert__equal [contents(:welcome), contents(:about), contents(:site_map), contents(:another)], assigns(:articles)
0
+ assert_models_equal [contents(:welcome), contents(:about), contents(:site_map), contents(:another)], assigns(:articles)
0
   end
0
   
0
   protected

Comments

    No one has commented yet.