Displaying 20 results from an estimated 50000 matches similar to: "to_time "time out of range""
2009 Jun 18
3
Date.new.to_time.to_i
What''s going on here!?
>> Date.new.to_time.to_i
NoMethodError: undefined method `to_i'' for Mon, 01 Jan -4712 00:00:00
-0800:DateTime
from (irb):25
>> Date.today.to_time.to_i
=> 1245308400
>> RUBY_VERSION
=> "1.8.7"
>> Rails.version
=> "2.1.1"
(I''m not sure if this is a rails thing, or just a ruby thing)
--
2010 Nov 12
1
Dashboard throwing undefined method `to_time' for nil:NilClass error on page view
Using 1.0.4 release on Solaris 10 with Ruby 1.8.7.
Starting the server in production mode works fine until I request a
page from the web browser then I get the following errors on the
console. I''m running as user puppet (have also tried as user root but
same output). All files are owned by user/group puppet/puppet.
I have dropped and recreated the database multiple times just to see
if
2006 May 24
0
distance_of_time_in_german_words
Hiall,
This could be useful for those of you producing websites in the german
language. Basically I copied the definition of the rails builtin
distance_of_time_in_words and extracted another method
german_words_for_distance_in_seconds. Just put these e.g. into module
ApplicationHelper and you can use it in all views.
def distance_of_time_in_german_words(from_time, to_time = 0,
include_seconds
2016 Jun 02
1
[PATCH -next 2/2] virtio_net: Read the advised MTU
Hi,
[auto build test ERROR on next-20160602]
url: https://github.com/0day-ci/linux/commits/Aaron-Conole/virtio-net-Advised-MTU-feature/20160603-000714
config: i386-allmodconfig (attached as .config)
compiler: gcc-6 (Debian 6.1.1-1) 6.1.1 20160430
reproduce:
# save the attached .config to linux build tree
make ARCH=i386
Note: the
2016 Jun 02
1
[PATCH -next 2/2] virtio_net: Read the advised MTU
Hi,
[auto build test ERROR on next-20160602]
url: https://github.com/0day-ci/linux/commits/Aaron-Conole/virtio-net-Advised-MTU-feature/20160603-000714
config: i386-allmodconfig (attached as .config)
compiler: gcc-6 (Debian 6.1.1-1) 6.1.1 20160430
reproduce:
# save the attached .config to linux build tree
make ARCH=i386
Note: the
2008 Jun 14
0
Bug and patch for vpim-0.619
On Sat, Jun 14, 2008 at 10:42 AM, Christopher J. Bottaro
<cjbottaro at alumni.cs.utexas.edu> wrote:
> I noticed two little bugs when using your vpim module in a Rails application.
>
> 1) The vpim module overwrites Rail''s implementation of Date#to_time.
> 2) The vpim module''s implementation of Date#to_time causes
> Date.today.to_time to return a Time that is
2007 Feb 21
2
date helper bug?
I''ve found an issue when trying to use the time_ago_in_words and
distance_of_time_in_words from action view''s date_helper.rb
Using SQL Server, I have a datetime column that gets returned as:
"2007/02/21 09:54:00". When I pass this to time_ago_in_words (which
just passes on to distance_of_time_in_words) it miscalculates the
difference as "9 hours" (...um yeah,
2008 Jun 08
20
how to parse a "dd/mm/yyyy" formatted date string???
Hi,
I''m stuck. How do you parse a "dd/mm/yyyy" formatted date string???
I get a date format error.
Thanks in advance
Greg
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to
2006 May 16
10
Date verus Time class
I''m using the date_select and datetime_select helpers in my view, and
they return Date classes from the params hash.
But how do I work with Date classes, they don''t print human readable
dates or times, Time classes work well I can use strftime("%H:%M") to
print to the screen.
Is it possible to convert a Date to a Time, Ive been tinkering in irb
but have got
2006 Jun 28
4
argument out of range...
Hi...
I''ve a problem with this :
[code]
def fir_tahiti
@notams=Array.new
Notam.find_all_notams().each do |notam|
@notams.push(notam) if (to_secs(notam.debut)<Time.now.to_i and
to_secs(notam.fin)>Time.now.to_i)
end
end
def to_secs(str = nil)
Time.gm(2000+str[0..1].to_i, str[2..3].to_i, str[4..5].to_i,
str[6..7].to_i, str[8..9].to_i).to_i if str
end
[/code]
It tells
2006 May 19
0
[OT] Important Issue with "TIME" as we had with Y2K.
Dear User,
In my previous article published in darpan 28/04/06 I mentioned ? technology is changing rapidly and there could be some unanticipated issues?, so here is the time to look into one...
"Date" is one of the well known representation of "Time" and plays a critical role in our life. Just for an example our financial transactions, Important events, various schedules
2011 Dec 01
3
System Time - UTC and Local Time
I have installed CentOS on a VM by checking 'System Clock uses UTC' option.
Later I selected CST time zone. Now the date command shows UTC time with
CST timezone: "Thu Dec 1 04:14:39 CST 2011". How do I change system
clock to show CST local time? Also, more likely a dumb question but why
isn't date command showing UTC here instead of CST?
jM
2009 Mar 14
2
Time Zone query
I am working with time-date data to plot temporal activity.
I would like to create a "template" to repeat the date and time for
all potential data sets that may have differing time zone origins.
Reading the > ?strptime help section I note that time zone is a
variable to add.
Looking at the output of a sample data set
Species Location Date Time
1 Sppaaa One 1/13/2009
2006 Aug 06
1
How to query with calculations?
Hi,
I would like to do something simple yet I''m confused.
Lets say I have a table with 2 fields: rank, updated_at.
I would like to show all records matching this condition:
rank = rank ? (Time.now.to_time ? Updated_at.to_time)
As you can see this is supposed to be a calculation on the field.
How do I write a query to show this?
I''ve tried with_scope, and regular find but did not
2007 Dec 20
4
object.send problem within ActiveRecord
I am using the send method in one of my active records ... executing a
method without any parameters works fine.. but when it comes to
parameters it says
ArgumentError: wrong number of arguments (1 for 0)
u = User.new
#works
u.send :firstname
#does not work => ArgumentError: wrong number of arguments (1 for 0)
u.send :firstname, ''michal''
does someone know why? the rubydoc
2007 May 11
0
BDC keeps taking over and not allowing logins from NT PDC
Hello, thanks for looking over my ramblings...
We have an NT4 PDC with and NT4 BDC on 192.168.132.X, these boxes are
very very old and overloaded. I am trying to replace them with a nice
shinny new Samba box. My problem is that while I am trying to test it
out to make sure it plays nice it keeps winning the elections.
I find this weird as I have set the box to domain master = no and turned
the
2010 Feb 11
2
Inconsistent Hash#to_xml Method
I have a unit test that demonstrates some inconsistent behavior with a
Hash being converted to XML with the :root option. Sometimes it works
fine:
Hash.new.to_xml(:root => ''test'')
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<test>\n</test>\n"
But sometimes I get an argument error:
Hash.new.to_xml(:root =>
2005 Dec 05
1
Automatic time zone conversion
Dear R-help,
I was trying to convert a date and time record extracted from a fortran
subroutine I worte and I encounter some problem. The data read in time
and date in a format like "2000-05-11_01:00:00.0000" in fortran output.
It is in GMT. I need to convert it to CST (GMT+8). I did the following
steps.
> cdate
[1] "2000-05-11_01:00:00.0000\005\003"
# I am not sure
2015 Jun 23
2
yum and yumex change system time
Richard, thank you for your response.
On 06/23/2015 02:51 PM, Richard wrote:
<<>>
> I agree, so my questions are:
>
> - what is your TZ?
u.s.a. 'central time zone' - currently on 'daylight savings time'.
> - what does "[/bin/]date" show?
[geo at boxen ~]$ date
Tue Jun 23 14:54:42 CDT 2015
> - what does your hardware clock:
2015 Jun 24
0
yum and yumex change system time
On 06/23/2015 04:47 PM, g wrote:
>
> Richard, thank you for your response.
>
>
> On 06/23/2015 02:51 PM, Richard wrote:
> <<>>
>
>> I agree, so my questions are:
>>
>> - what is your TZ?
>
> u.s.a. 'central time zone' - currently on 'daylight savings time'.
>
>> - what does "[/bin/]date" show?