fix report time helper

refs CNVS-12817

test plan 
 - specs should pass

Change-Id: I33e2e9c419de84e28ced1b28545121e022bf1360
Reviewed-on: https://gerrit.instructure.com/34211
Reviewed-by: Dave Jungst <dave@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
This commit is contained in:
Rob Orton 2014-05-01 16:53:43 -06:00
parent 92c8acc94b
commit 1c2e0e5140
1 changed files with 3 additions and 3 deletions

View File

@ -1,5 +1,5 @@
#
# Copyright (C) 2012 - 2013 Instructure, Inc.
# Copyright (C) 2012 - 2014 Instructure, Inc.
#
# This file is part of Canvas.
#
@ -41,9 +41,9 @@ module Canvas::AccountReports::ReportHelper
end
# This function will take a datetime or a datetime string and convert into
# iso8601 for the root_account's timezone
# strftime for the root_account's timezone
# it will then format the datetime using the given format string
def timezone_strftime(datetime, format)
def timezone_strftime(datetime, format, account=root_account)
if datetime = parse_utc_string(datetime)
(datetime.in_time_zone(account.default_time_zone)).strftime(format)
end