Commit 678fdc75 authored by Ivan Tyagov's avatar Ivan Tyagov

Get current time as UTC rather than local time (see r17867 - r17870).


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@17874 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent cec1536a
......@@ -8,4 +8,4 @@ class_name:
class_file:
</dtml-comment>
<params></params>
SELECT NOW()
SELECT UTC_TIMESTAMP()
......@@ -10,7 +10,7 @@ class_file:
<params>uid</params>
UPDATE message
SET
processing_date = NOW(),
processing_date = UTC_TIMESTAMP(),
processing = 1
WHERE
uid IN (
......
......@@ -22,7 +22,7 @@ SET
, priority = <dtml-sqlvar priority type="int">
</dtml-if>
<dtml-if delay>
, date = DATE_ADD(NOW(), INTERVAL <dtml-sqlvar delay type="int"> * (retry + 1) SECOND)
, date = DATE_ADD(UTC_TIMESTAMP(), INTERVAL <dtml-sqlvar delay type="int"> * (retry + 1) SECOND)
<dtml-elif date>
, date = <dtml-sqlvar date type="datetime">
</dtml-if>
......
......@@ -21,7 +21,7 @@ INSERT INTO message
SET
uid = <dtml-sqlvar uid type="int">,
path = <dtml-sqlvar path type="string">,
date = <dtml-if date><dtml-sqlvar date type="datetime"><dtml-else>NOW()</dtml-if>,
date = <dtml-if date><dtml-sqlvar date type="datetime"><dtml-else>UTC_TIMESTAMP()</dtml-if>,
method_id = <dtml-sqlvar method_id type="string">,
processing_node = <dtml-sqlvar processing_node type="int">,
processing = 0,
......
......@@ -25,7 +25,7 @@ VALUES
(
<dtml-sqlvar expr="uid_list[loop_item]" type="int">,
<dtml-sqlvar expr="path_list[loop_item]" type="string">,
<dtml-if date_list><dtml-if expr="date_list[loop_item] is not None"><dtml-sqlvar expr="date_list[loop_item]" type="datetime"><dtml-else>NOW()</dtml-if><dtml-else>NOW()</dtml-if>,
<dtml-if date_list><dtml-if expr="date_list[loop_item] is not None"><dtml-sqlvar expr="date_list[loop_item]" type="datetime"><dtml-else>UTC_TIMESTAMP()</dtml-if><dtml-else>UTC_TIMESTAMP()</dtml-if>,
<dtml-sqlvar expr="method_id_list[loop_item]" type="string">,
<dtml-if processing_node_list><dtml-sqlvar expr="processing_node_list[loop_item]" type="int"><dtml-else>-1</dtml-if>,
0,
......
......@@ -11,7 +11,7 @@ class_file:
UPDATE
message_queue
SET
processing_date = NOW(),
processing_date = UTC_TIMESTAMP(),
processing=1
WHERE
uid IN (
......
......@@ -19,7 +19,7 @@ SET
, priority = <dtml-sqlvar priority type="int">
</dtml-if>
<dtml-if delay>
, date = DATE_ADD(NOW(), INTERVAL <dtml-sqlvar delay type="int"> SECOND)
, date = DATE_ADD(UTC_TIMESTAMP(), INTERVAL <dtml-sqlvar delay type="int"> SECOND)
<dtml-elif date>
, date = <dtml-sqlvar date type="datetime">
</dtml-if>
......
......@@ -19,7 +19,7 @@ INSERT INTO message_queue
SET
uid = <dtml-sqlvar uid type="int">,
path = <dtml-sqlvar path type="string">,
date = <dtml-if date><dtml-sqlvar date type="datetime"><dtml-else>NOW()</dtml-if>,
date = <dtml-if date><dtml-sqlvar date type="datetime"><dtml-else>UTC_TIMESTAMP()</dtml-if>,
method_id = <dtml-sqlvar method_id type="string">,
<dtml-if processing_node>
processing_node = <dtml-sqlvar processing_node type="int">,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment