Open FDahmani opened 1 year ago
Hi Fabien, do you have a minimal script that yields this issue? For me the following:
import datetime
from tudatpy.kernel.astro import time_conversion
calendar_date = datetime.datetime(1920, 5, 21, 13, 52, 41)
print(calendar_date)
julian_date = time_conversion.calendar_date_to_julian_day(calendar_date)
print(julian_date)
runs perfectly fine. Does this script run for you?
For me, this exact script does not work. It only prints the calendar date and only when choosing a date after 1970 it prints the Julian date as well. I am using VSC and I am running Tudatpy=0.7.3.dev4. Even when running from the shell, the program stops without any output.
That's very odd... which OS are you using? If I understand you correctly, it prints nothing for a date before 1970, and only the calendar date for a date after 1970?
I'm using windows, and no it always prints a calendar date (correct, i.e. the datetime function works well), but only prints a JD after 1970.
Hi Fabien, if you build a manual kernel with the latest develop branch, and use this for your code, does the issue persist?
date = datetime.datetime(1960,1,1,13,7,23,891234)
date_check = time_conversion.calendar_date_to_julian_day(date)
print(date_check,date)
gives
RuntimeError: Error when creating Tudat DateTime, input seconds was -0.108766
date = datetime.datetime(1960,1,1,13,7,23)
date_check = time_conversion.calendar_date_to_julian_day(date)
print(date_check,date)
gives no output
This only happens on Windows for me, in my Linux environment it goes smoothly
Hi all, I've noticed some strange behavior with the 'time_conversion.calendar_date_to_julian_day()' function. Specifically, when trying a date before 1970, it simply stops the script without providing any output or error.
Thanks, Fabien