Skip to content

Commit

Permalink
[dist] clouduploader: Time.zone is not Ruby
Browse files Browse the repository at this point in the history
Time.zone is ActiveSupport but we are not in rails here. We calculate
only a time difference, so the zone does not matter anyway.
  • Loading branch information
adrianschroeter authored and hennevogel committed Mar 2, 2023
1 parent 1630690 commit 0c885c2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dist/clouduploader.rb
Expand Up @@ -10,7 +10,7 @@
module CloudUploader
# Module method for uploading the image depending on the platform
def self.upload(_user, platform, backend_image_file, job_data_file, image_filename, result_path)
start = Time.zone.now
start = Time.now

STDOUT.sync = true
STDOUT.write("Start uploading image #{image_filename}.\n")
Expand All @@ -26,7 +26,7 @@ def self.upload(_user, platform, backend_image_file, job_data_file, image_filena
abort('No valid platform. Valid platforms are "ec2" and "azure".')
end

diff = Time.zone.now - start
diff = Time.now - start
STDOUT.write("Upload took: #{Time.at(diff).utc.strftime('%H:%M:%S')}\n")
end

Expand Down

0 comments on commit 0c885c2

Please sign in to comment.