summaryrefslogtreecommitdiffstats
path: root/extensions/BMO
diff options
context:
space:
mode:
authorDavid Lawrence <dkl@mozilla.com>2016-05-14 16:09:38 +0200
committerDavid Lawrence <dkl@mozilla.com>2016-05-14 16:09:38 +0200
commit35df2cd5bc44b1f369ca6d32dfe1c600c1608dc4 (patch)
tree7817fa1c5616ce13268e7aecd6dde23f24ba314c /extensions/BMO
parent627be9de2e720f289f0b151c0057be7af0e84a72 (diff)
downloadbugzilla-35df2cd5bc44b1f369ca6d32dfe1c600c1608dc4.tar.gz
bugzilla-35df2cd5bc44b1f369ca6d32dfe1c600c1608dc4.tar.xz
Bug 232193 - bmo's systems (webheads, database, etc) should use UTC natively for o/s timezone and date storage
Diffstat (limited to 'extensions/BMO')
-rw-r--r--extensions/BMO/lib/Reports/ReleaseTracking.pm4
-rw-r--r--extensions/BMO/lib/Reports/UserActivity.pm16
2 files changed, 12 insertions, 8 deletions
diff --git a/extensions/BMO/lib/Reports/ReleaseTracking.pm b/extensions/BMO/lib/Reports/ReleaseTracking.pm
index 0d9a51583..8894a5169 100644
--- a/extensions/BMO/lib/Reports/ReleaseTracking.pm
+++ b/extensions/BMO/lib/Reports/ReleaseTracking.pm
@@ -367,9 +367,9 @@ sub report {
push @where, "(a.fieldid = ?)";
push @params, $q->{field_id};
- push @where, "(a.bug_when >= ?)";
+ push @where, "(CONVERT_TZ(a.bug_when, 'UTC', 'America/Los_Angeles') >= ?)";
push @params, $q->{start_date} . ' 00:00:00';
- push @where, "(a.bug_when <= ?)";
+ push @where, "(CONVERT_TZ(a.bug_when, 'UTC', 'America/Los_Angeles') <= ?)";
push @params, $q->{end_date} . ' 23:59:59';
push @where, "(a.added LIKE ?)";
diff --git a/extensions/BMO/lib/Reports/UserActivity.pm b/extensions/BMO/lib/Reports/UserActivity.pm
index 04810c2ec..0a8e79e1f 100644
--- a/extensions/BMO/lib/Reports/UserActivity.pm
+++ b/extensions/BMO/lib/Reports/UserActivity.pm
@@ -126,7 +126,8 @@ sub report {
INNER JOIN profiles
ON profiles.userid = bugs_activity.who
WHERE profiles.login_name IN ($who_bits)
- AND bugs_activity.bug_when >= ? AND bugs_activity.bug_when <= ?
+ AND CONVERT_TZ(bugs_activity.bug_when, 'UTC', 'America/Los_Angeles') >= ?
+ AND CONVERT_TZ(bugs_activity.bug_when, 'UTC', 'America/Los_Angeles') <= ?
$activity_where
UNION ALL
@@ -147,8 +148,8 @@ sub report {
INNER JOIN profiles
ON profiles.userid = longdescs_tags_activity.who
WHERE profiles.login_name IN ($who_bits)
- AND longdescs_tags_activity.bug_when >= ?
- AND longdescs_tags_activity.bug_when <= ?
+ AND CONVERT_TZ(longdescs_tags_activity.bug_when, 'UTC', 'America/Los_Angeles') >= ?
+ AND CONVERT_TZ(longdescs_tags_activity.bug_when, 'UTC', 'America/Los_Angeles') <= ?
$tags_activity_where
UNION ALL
@@ -167,7 +168,8 @@ sub report {
INNER JOIN profiles
ON profiles.userid = bugs.reporter
WHERE profiles.login_name IN ($who_bits)
- AND bugs.creation_ts >= ? AND bugs.creation_ts <= ?
+ AND CONVERT_TZ(bugs.creation_ts, 'UTC', 'America/Los_Angeles') >= ?
+ AND CONVERT_TZ(bugs.creation_ts, 'UTC', 'America/Los_Angeles') <= ?
UNION ALL
@@ -185,7 +187,8 @@ sub report {
INNER JOIN profiles
ON profiles.userid = longdescs.who
WHERE profiles.login_name IN ($who_bits)
- AND longdescs.bug_when >= ? AND longdescs.bug_when <= ?
+ AND CONVERT_TZ(longdescs.bug_when, 'UTC', 'America/Los_Angeles') >= ?
+ AND CONVERT_TZ(longdescs.bug_when, 'UTC', 'America/Los_Angeles') <= ?
$comment_filter
UNION ALL
@@ -204,7 +207,8 @@ sub report {
INNER JOIN profiles
ON profiles.userid = attachments.submitter_id
WHERE profiles.login_name IN ($who_bits)
- AND attachments.creation_ts >= ? AND attachments.creation_ts <= ?
+ AND CONVERT_TZ(attachments.creation_ts, 'UTC', 'America/Los_Angeles') >= ?
+ AND CONVERT_TZ(attachments.creation_ts, 'UTC', 'America/Los_Angeles') <= ?
$attachments_where
ORDER BY $order ";