N
Navindra Umanee
Hi!
I have some newbie questions.
from /usr/lib/ruby/1.8/date.rb:485:in `new_with_hash'
from /usr/lib/ruby/1.8/date.rb:495:in `strptime'
from (irb):31
Why does the first command work but not the second one?
Out of curiosity is there a standard/builtin way of printing ISO8601
date format instead of having to use to_yaml and chopping off the "---
" garbage string at the beginning of the input or having to manually
specify '%F %T %z'?
Also, is there a way of printing fractional seconds? I see that
DateTime has sec_fraction() but '%N' doesn't seem to work in the
string definition.
Thanks a lot!
Cheers,
Navin.
I have some newbie questions.
=> "970132981"DateTime.strptime('2000-09-28 05:23:01 -0400', '%F %T %z').strftime('%s')
ArgumentError: invalid dateDateTime.strptime('970132981', '%s').strftime('%s')
from /usr/lib/ruby/1.8/date.rb:485:in `new_with_hash'
from /usr/lib/ruby/1.8/date.rb:495:in `strptime'
from (irb):31
Why does the first command work but not the second one?
Out of curiosity is there a standard/builtin way of printing ISO8601
date format instead of having to use to_yaml and chopping off the "---
" garbage string at the beginning of the input or having to manually
specify '%F %T %z'?
Also, is there a way of printing fractional seconds? I see that
DateTime has sec_fraction() but '%N' doesn't seem to work in the
string definition.
Thanks a lot!
Cheers,
Navin.