Closed prouty closed 11 years ago
This actually isn't needed, it will do the right thing with a Time
object
Are you sure about that? I can specifically see this not working correctly without calling to_i.
I'm doing an import of Member login activity. This first example does not work—it puts all of the events at the current date/time. The second example does work, putting the time of the events where I specify (by the login create time). The only difference is that to_i appended to login.created_at. It's very possible there's something else that's causing the problem, but from what I can see the to_i is necessary.
@logins.each do |login|
@mixpanel.import 'Member logged in', super_properties.merge({ :distinct_id => user.mixpanel_identifier, :time => login.created_at }), import_options
end
@logins.each do |login|
@mixpanel.import 'Member logged in', super_properties.merge({ :distinct_id => user.mixpanel_identifier, :time => login.created_at.to_i }), import_options
end
@prouty you were right, we've got #120 out there that should fix the issue.
...ected to be in epoch time (e.g., 5.weeks.ago should be 5.weeks.ago.to_i)