(Mar-03-2019, 04:32 PM)samsonite Wrote: No, because of the unnecessary import pendulum.I did post a solution with datetime and strptime before in Thread.
>>> import datetime >>> import julian >>> >>> dt_str = '2018-09-09 12:12:12.005876' >>> dt = datetime.datetime.strptime(dt_str, "%Y-%m-%d %H:%M:%S.%f") >>> julian.to_jd(dt, fmt='jd') 2458371.0084722904Pendulum works just like daytime,just with a lot of improvements like eg i use
parse
of dates strings.Quote:Drop-in replacement for the standard datetime class.
It behaves exactly like it but with many improvements.
If libraries over time show that they are much better than what's is standard library,
i will recommenced that,like eg Requests over urllib and many more.