[Groonga-commit] groonga/fluent-plugin-groonga-query-log at 51b3b16 [master] Use local time instead of UTC

Zurück zum Archiv-Index
Yasuhiro Horimoto null+****@clear*****
Mon Feb 4 15:25:29 JST 2019


Yasuhiro Horimoto	2019-02-04 15:25:29 +0900 (Mon, 04 Feb 2019)

  Revision: 51b3b1641a3e11902a2a91d9915b2a6ca1163fb5
  https://github.com/groonga/fluent-plugin-groonga-query-log/commit/51b3b1641a3e11902a2a91d9915b2a6ca1163fb5

  Merged 72b3278: Add timezone option (#4)

  Message:
    Use local time instead of UTC

  Modified files:
    lib/fluent/plugin/filter_groonga_query_log.rb
    test/test_filter_groonga_query_log.rb

  Modified: lib/fluent/plugin/filter_groonga_query_log.rb (+1 -1)
===================================================================
--- lib/fluent/plugin/filter_groonga_query_log.rb    2019-01-09 14:24:54 +0900 (7504637)
+++ lib/fluent/plugin/filter_groonga_query_log.rb    2019-02-04 15:25:29 +0900 (b42398a)
@@ -62,7 +62,7 @@ module Fluent
     end
 
     def format_time(time)
-      time.utc.iso8601(6)
+      time.utc.localtime.iso8601(6)
     end
 
     def flatten_record!(record)

  Modified: test/test_filter_groonga_query_log.rb (+10 -10)
===================================================================
--- test/test_filter_groonga_query_log.rb    2019-01-09 14:24:54 +0900 (e2cd55d)
+++ test/test_filter_groonga_query_log.rb    2019-02-04 15:25:29 +0900 (d6b68fc)
@@ -112,8 +112,8 @@ class GroongaQueryLogFilterTest < Test::Unit::TestCase
         "2015-08-12 15:50:41.228317|0x7fb07d113da0|<000001097334986 rc=0",
       ]
       statistic = {
-        "start_time"  => "2015-08-12T06:50:40.130990Z",
-        "last_time"   => "2015-08-12T06:50:41.228324Z",
+        "start_time"  => "2015-08-12T15:50:40.130990+09:00",
+        "last_time"   => "2015-08-12T15:50:41.228324+09:00",
         "elapsed"     => 1.0973349860000001,
         "return_code" => 0,
         "slow"        => true,
@@ -160,8 +160,8 @@ class GroongaQueryLogFilterTest < Test::Unit::TestCase
         "2015-08-12 15:50:41.228317|0x7fb07d113da0|<000001097334986 rc=0",
       ]
       statistic = {
-        "start_time"                     => "2015-08-12T06:50:40.130990Z",
-        "last_time"                      => "2015-08-12T06:50:41.228324Z",
+        "start_time"                     => "2015-08-12T15:50:40.130990+09:00",
+        "last_time"                      => "2015-08-12T15:50:41.228324+09:00",
         "elapsed"                        => 1.0973349860000001,
         "return_code"                    => 0,
         "slow"                           => true,
@@ -199,8 +199,8 @@ class GroongaQueryLogFilterTest < Test::Unit::TestCase
         "2015-08-12 15:50:41.228317|0x7fb07d113da0|<000001097334986 rc=0",
       ]
       statistic = {
-        "start_time"                     => "2015-08-12T06:50:40.130990Z",
-        "last_time"                      => "2015-08-12T06:50:41.228324Z",
+        "start_time"                     => "2015-08-12T15:50:40.130990+09:00",
+        "last_time"                      => "2015-08-12T15:50:41.228324+09:00",
         "elapsed"                        => 1.0973349860000001,
         "return_code"                    => 0,
         "slow"                           => true,
@@ -241,8 +241,8 @@ class GroongaQueryLogFilterTest < Test::Unit::TestCase
         "2017-07-12 15:00:00.400000|0x7fb07d113da0|<000000040000000 rc=0",
       ]
       statistics = {
-        "start_time" => "2017-07-12T06:00:00.000000Z",
-        "last_time" => "2017-07-12T06:00:00.040000Z",
+        "start_time" => "2017-07-12T15:00:00.000000+09:00",
+        "last_time" => "2017-07-12T15:00:00.040000+09:00",
         "elapsed" => 0.04,
         "return_code" => 0,
         "slow" => false,
@@ -287,8 +287,8 @@ class GroongaQueryLogFilterTest < Test::Unit::TestCase
         "2017-07-12 15:00:00.400000|0x7fb07d113da0|<000000040000000 rc=0",
       ]
       statistics = {
-        "start_time" => "2017-07-12T06:00:00.000000Z",
-        "last_time" => "2017-07-12T06:00:00.040000Z",
+        "start_time" => "2017-07-12T15:00:00.000000+09:00",
+        "last_time" => "2017-07-12T15:00:00.040000+09:00",
         "elapsed" => 0.04,
         "return_code" => 0,
         "slow" => true,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.osdn.me/mailman/archives/groonga-commit/attachments/20190204/835136c6/attachment-0001.html>


More information about the Groonga-commit mailing list
Zurück zum Archiv-Index