def from_current_timezone(value):
 if (settings.USE_TZ and (value is not None) and timezone.is_naive(value)):
  current_timezone = timezone.get_current_timezone()
  try:
   return timezone.make_aware(value, current_timezone)
  except Exception:
   raise ValidationError((_(u"%(datetime)s couldn't be interpreted in time zone %(current_timezone)s; it may be ambiguous or it may not exist.") % {u'datetime': value, u'current_timezone': current_timezone}))
 return value

def from_current_timezone ( value ) : if ( settings . USE_TZ and ( value is not None ) and timezone . is_naive ( value ) ) : current_timezone = timezone . get_current_timezone ( ) try : return timezone . make_aware ( value , current_timezone ) except Exception : raise ValidationError ( ( _ ( u"%(datetime)s couldn't be interpreted in time zone %(current_timezone)s; it may be ambiguous or it may not exist." ) % { u'datetime' : value , u'current_timezone' : current_timezone } ) ) return value
when time zone support is enabled .