search for: beginning_of_day

Displaying 5 results from an estimated 5 matches for "beginning_of_day".

2006 Aug 07
3
repeat_every doesn''t tie in with first_run...
Ezra, Sorry for inundating the list. In using the autostart, repeat_every, and first_run, I noticed a behaviour I didn''t expect. I would like the job to run starting at 2am, and then every 24 hours. So I set first_run to Time.now.beginning_of_day + 2.hours, and repeat_every to 24.hours. The problem is if backgroundrb starts up at 6am (due to a code change or server bump), then the process runs immediately (because first_run < Time.now), and then runs every 24 hours from that time, so 6am every day. I was expecting more cron-ish behavio...
2007 Mar 13
6
Easy Date question - newb
All I want to do is find the objects that were created today under the ''created_on'' column. I''ve tried many ways, here is one example using the chronic gem. @products = Product.find_all_by_created_on(Chronic.parse(''today'')) I must be missing something right in front of me .... Thanks for any help.
2006 Oct 24
13
How can my boss take rails seriously with bugs like this?
The Time::next_week method is supposed to give the time of the start of the next week. But look at this, it cocks up : >> t=Time.parse "Monday October 16th 2006" => Mon Oct 16 00:00:00 BST 2006 >> t.next_week => Mon Oct 23 00:00:00 BST 2006 >> t.next_week.next_week => Tue Oct 24 00:00:00 BST 2006 >> t.next_week.next_week.next_week => Mon Oct 30
2010 Oct 13
10
Rails 2.3.8 - What happens to a datetime field between a form being submitted and the controller receiving the params
I currently have a model that simply contains one datetime field: class CreateElectricityReadings < ActiveRecord::Migration def self.up create_table :clocks do |t| t.datetime :time_keeper t.timestamps end end def self.down drop_table :clocks end end If I enter the date string "13/10/2010" into this field its showing up in the controller as
2009 Jul 23
11
Problem with named_scope
Here are my scopes: default_scope :order => ''posted_on DESC'', :conditions => { :status => ''visible'' } named_scope :positive, :conditions => { :rating => ''positive'', :status => ''visible'' } named_scope :neutral, :conditions => { :rating => ''neutral'', :status =>