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: ...@@ -8,4 +8,4 @@ class_name:
class_file: class_file:
</dtml-comment> </dtml-comment>
<params></params> <params></params>
SELECT NOW() SELECT UTC_TIMESTAMP()
...@@ -10,7 +10,7 @@ class_file: ...@@ -10,7 +10,7 @@ class_file:
<params>uid</params> <params>uid</params>
UPDATE message UPDATE message
SET SET
processing_date = NOW(), processing_date = UTC_TIMESTAMP(),
processing = 1 processing = 1
WHERE WHERE
uid IN ( uid IN (
......
...@@ -22,7 +22,7 @@ SET ...@@ -22,7 +22,7 @@ SET
, priority = <dtml-sqlvar priority type="int"> , priority = <dtml-sqlvar priority type="int">
</dtml-if> </dtml-if>
<dtml-if delay> <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> <dtml-elif date>
, date = <dtml-sqlvar date type="datetime"> , date = <dtml-sqlvar date type="datetime">
</dtml-if> </dtml-if>
......
...@@ -21,7 +21,7 @@ INSERT INTO message ...@@ -21,7 +21,7 @@ INSERT INTO message
SET SET
uid = <dtml-sqlvar uid type="int">, uid = <dtml-sqlvar uid type="int">,
path = <dtml-sqlvar path type="string">, 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">, method_id = <dtml-sqlvar method_id type="string">,
processing_node = <dtml-sqlvar processing_node type="int">, processing_node = <dtml-sqlvar processing_node type="int">,
processing = 0, processing = 0,
......
...@@ -25,7 +25,7 @@ VALUES ...@@ -25,7 +25,7 @@ VALUES
( (
<dtml-sqlvar expr="uid_list[loop_item]" type="int">, <dtml-sqlvar expr="uid_list[loop_item]" type="int">,
<dtml-sqlvar expr="path_list[loop_item]" type="string">, <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-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>, <dtml-if processing_node_list><dtml-sqlvar expr="processing_node_list[loop_item]" type="int"><dtml-else>-1</dtml-if>,
0, 0,
......
...@@ -11,7 +11,7 @@ class_file: ...@@ -11,7 +11,7 @@ class_file:
UPDATE UPDATE
message_queue message_queue
SET SET
processing_date = NOW(), processing_date = UTC_TIMESTAMP(),
processing=1 processing=1
WHERE WHERE
uid IN ( uid IN (
......
...@@ -19,7 +19,7 @@ SET ...@@ -19,7 +19,7 @@ SET
, priority = <dtml-sqlvar priority type="int"> , priority = <dtml-sqlvar priority type="int">
</dtml-if> </dtml-if>
<dtml-if delay> <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> <dtml-elif date>
, date = <dtml-sqlvar date type="datetime"> , date = <dtml-sqlvar date type="datetime">
</dtml-if> </dtml-if>
......
...@@ -19,7 +19,7 @@ INSERT INTO message_queue ...@@ -19,7 +19,7 @@ INSERT INTO message_queue
SET SET
uid = <dtml-sqlvar uid type="int">, uid = <dtml-sqlvar uid type="int">,
path = <dtml-sqlvar path type="string">, 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">, method_id = <dtml-sqlvar method_id type="string">,
<dtml-if processing_node> <dtml-if processing_node>
processing_node = <dtml-sqlvar processing_node type="int">, 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