2017-03-02 1 views

Répondre

2

créer Voici un simple python datetime.datetime instance elle-même.

Pour python moins 2.x

Vous pouvez le faire.

my_model = MyModel() 
int(my_model.create.strftime('%s')) 

Pour python 3.3+

Vous pouvez juste faire

my_model = MyModel() 
my_model.create.timestamp()