[Groonga-commit] droonga/droonga-engine at 530b1a6 [master] Always use UTC for filename timestamp of buffers

Back to archive index

YUKI Hiroshi null+****@clear*****
Tue Apr 28 22:25:35 JST 2015


YUKI Hiroshi	2015-04-28 22:25:35 +0900 (Tue, 28 Apr 2015)

  New Revision: 530b1a67f09a4bce47307ba55b25fb66ed0b5ba7
  https://github.com/droonga/droonga-engine/commit/530b1a67f09a4bce47307ba55b25fb66ed0b5ba7

  Message:
    Always use UTC for filename timestamp of buffers

  Modified files:
    lib/droonga/buffered_tcp_socket.rb
    lib/droonga/forward_buffer.rb

  Modified: lib/droonga/buffered_tcp_socket.rb (+1 -2)
===================================================================
--- lib/droonga/buffered_tcp_socket.rb    2015-04-28 22:04:00 +0900 (b24b4e9)
+++ lib/droonga/buffered_tcp_socket.rb    2015-04-28 22:25:35 +0900 (6e74a49)
@@ -136,7 +136,6 @@ module Droonga
         @data_directory = params[:directory]
         @data = params[:data]
         @time_stamp = params[:time_stamp] || Time.now
-        @time_stamp = @time_stamp.utc
         @uniqueness = params[:uniqueness]
         @revision = params[:revision] || 0
       end
@@ -166,7 +165,7 @@ module Droonga
       end
 
       def create_chunk_file_path
-        basename = @time_stamp.iso8601(MICRO_SECONDS_DECIMAL_PLACE)
+        basename = @time_stamp.utc.iso8601(MICRO_SECONDS_DECIMAL_PLACE)
         if @uniqueness
           @data_directory + "#{basename}.#{@uniqueness}.#{@revision}#{SUFFIX}"
         else

  Modified: lib/droonga/forward_buffer.rb (+1 -1)
===================================================================
--- lib/droonga/forward_buffer.rb    2015-04-28 22:04:00 +0900 (102bb44)
+++ lib/droonga/forward_buffer.rb    2015-04-28 22:25:35 +0900 (8b4e394)
@@ -144,7 +144,7 @@ module Droonga
     MICRO_SECONDS_DECIMAL_PLACE = 6
 
     def create_buffered_message_path(time_stamp=Time.now)
-      basename = time_stamp.iso8601(MICRO_SECONDS_DECIMAL_PLACE)
+      basename = time_stamp.utc.iso8601(MICRO_SECONDS_DECIMAL_PLACE)
       Path.unique_file_path(@data_directory, basename, SUFFIX)
     end
 
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index