From 12ef158d5c130815ca8e64ff9c4129c285795449 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Thu, 6 Feb 2020 13:45:23 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8E=B7=E5=8F=96=E8=A7=86=E9=A2=91=E6=95=B0?= =?UTF-8?q?=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/tasks/get_video_data.rake | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/tasks/get_video_data.rake b/lib/tasks/get_video_data.rake index 253611d78..e09ead381 100644 --- a/lib/tasks/get_video_data.rake +++ b/lib/tasks/get_video_data.rake @@ -1,16 +1,16 @@ namespace :video do desc "get video play data" task :data => :environment do - start_times = ['2019-08-19 00:00:00', '2019-11-10 00:00:00'] - end_times = ['2019-11-06 23:59:59', '2019-02-06 23:59:59'] + start_times = ['2019-08-19T00:00:00Z', '2019-11-10T00:00:00Z'] + end_times = ['2019-11-06T23:59:59Z', '2019-02-06T23:59:59Z'] Video.all.each do |video| vv = 0 play_duration = 0 start_times.each_with_index do |time, index| - start_time = time.to_time.getutc - end_time = end_times[index].to_time.getutc + start_time = time + end_time = end_times[index] data = AliyunVod::Service.video_data(video.uuid, start_time, end_time)