vvksahoo
Results
2
comments of
vvksahoo
Hey @lafrech , i have gone through those link but seriously didnt get how to validate epoch time. if i will use ```start_at = fields.DateTime(required=True)``` then its giving "Not a...
``` start_at = fields.DateTime(required=True) @pre_load def convert_epoch_time_to_datetime(self, data, **kwargs): try: data['start_at'] = time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(data['start_at'])) except (OSError, ValueError): raise ValidationError("start_at is invalid.") @post_load def convert_datetime_to_epoch_time(self, data, **kwargs): pattern = '%Y-%m-%d...