Skip to content

Commit

Permalink
Use time_ns() instead of time() (#270)
Browse files Browse the repository at this point in the history
  • Loading branch information
oittaa authored Aug 3, 2024
1 parent b7ec8dc commit 5f390af
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/gcp_storage_emulator/handlers/objects.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import hashlib
import json
import logging
import math
import re
import secrets
import string
Expand Down Expand Up @@ -124,7 +123,7 @@ def _patch_object(obj, metadata):
def _make_object_resource(
base_url, bucket_name, object_name, content_type, content_length, metadata=None
):
time_id = math.floor(time.time())
time_id = time.time_ns()
now = datetime.now(timezone.utc).strftime("%Y-%m-%dT%H:%M:%S.%fZ")

obj = {
Expand Down

0 comments on commit 5f390af

Please sign in to comment.