コード例 #1
0
ファイル: serializers.py プロジェクト: MOconcepts/rapidpro
def format_datetime(value):
    """
    Datetime fields are formatted with microsecond accuracy for v2
    """
    return datetime_to_json_date(value, micros=True) if value else None
コード例 #2
0
def format_datetime(value):
    """
    Datetime fields are formatted with microsecond accuracy for v2
    """
    return datetime_to_json_date(value, micros=True) if value else None
コード例 #3
0
ファイル: serializers.py プロジェクト: cybort/rapidpro
def format_datetime(value):
    """
    Datetime fields are limited to millisecond accuracy for v1
    """
    return datetime_to_json_date(value, micros=False) if value else None