Js Date object to python datetime

后端 未结 3 1097
情深已故
情深已故 2021-01-01 23:07

I am working with dhtmlxscheduler and I am sending dates to the django server for processing.

Dhtmlxscheduler provides me with the following date object, the methods

3条回答
  •  失恋的感觉
    2021-01-01 23:34

    Try using python-dateutil (pip install python-dateutil)

    import dateutil.parser as dt
    date_time_obj = dt.parse("Tue, 22 Nov 2011 06:00:00 GMT")
    

    date_time_obj will be a datetime object

提交回复
热议问题