ruby on rails - "published" time not right when parsing using Feedzirra -


i'm using feedzirra parse feed, , method creating entries like

class feed < activerecord::base  def create_entries rawfeed    self.entries.create(title: rawfeed.title, content:rawfeed.content, published:rawfeed.published,                   url: rawfeed.url, guid: rawfeed.id) end 

it works fine except created entry's "published" time wired: like

2000-01-01 17:26:15 utc  

i check entry passed create method, looks fine. have no idea goes wrong. other attributes normal, including "created_at" attribute. has suggestion? much.

i met same problem mysql.

your entry's 'published' field defined :time? migration file entry, such db/migrate/xxxxx_create_entries.rb

after changing :time :datetime, goes fine.

please try solution.

p.s.

in development env, problem not happen. think sqlite differ in way handle field :time way of mysql.


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

javascript - Clean way to programmatically use CSS transitions from JS? -

android - send complex objects as post php java -