Navigation Menu

Skip to content

Commit

Permalink
Always use UTC for filename timestamp of buffers
Browse files Browse the repository at this point in the history
  • Loading branch information
piroor committed Apr 28, 2015
1 parent a062a20 commit 530b1a6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions lib/droonga/buffered_tcp_socket.rb
Expand Up @@ -136,7 +136,6 @@ def initialize(params)
@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
Expand Down Expand Up @@ -166,7 +165,7 @@ def path
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
Expand Down
2 changes: 1 addition & 1 deletion lib/droonga/forward_buffer.rb
Expand Up @@ -144,7 +144,7 @@ def forward(buffered_message_path)
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

Expand Down

0 comments on commit 530b1a6

Please sign in to comment.