from time import time


def dynamic_import(path):
    module, builder = path.rsplit(".", 1)
    return getattr(__import__(module, fromlist=[builder]), builder)


def current_ts():
    """
    Just gives current timestamp.
    """
    return int(time() * 1000)

from datetime import datetime


def dynamic_import(path):
    module, builder = path.rsplit(".", 1)
    return getattr(__import__(module, fromlist=[builder]), builder)


def current_ts():
    """
    Just gives current timestamp.
    """
    utcnow = datetime.utcnow()
    return int(utcnow.timestamp() * 1000)

Use UTC timestamp as timestamp
Use UTC timestamp as timestamp

- from time import time
+ from datetime import datetime
  
  
  def dynamic_import(path):
      module, builder = path.rsplit(".", 1)
      return getattr(__import__(module, fromlist=[builder]), builder)
  
  
  def current_ts():
      """
      Just gives current timestamp.
      """
+     utcnow = datetime.utcnow()
-     return int(time() * 1000)
+     return int(utcnow.timestamp() * 1000)
  
Use UTC timestamp as timestamp
## Code Before:
from time import time


def dynamic_import(path):
    module, builder = path.rsplit(".", 1)
    return getattr(__import__(module, fromlist=[builder]), builder)


def current_ts():
    """
    Just gives current timestamp.
    """
    return int(time() * 1000)

## Instruction:
Use UTC timestamp as timestamp
## Code After:
from datetime import datetime


def dynamic_import(path):
    module, builder = path.rsplit(".", 1)
    return getattr(__import__(module, fromlist=[builder]), builder)


def current_ts():
    """
    Just gives current timestamp.
    """
    utcnow = datetime.utcnow()
    return int(utcnow.timestamp() * 1000)
