def get_datetime_now():
 try:
  from django.utils import timezone
  return timezone.now()
 except ImportError:
  return datetime.datetime.now()

def get_datetime_now ( ) : try : from django . utils import timezone return timezone . now ( ) except ImportError : return datetime . datetime . now ( )
returns datetime object with current point in time .