Python Forum

Full Version: Time class with picosecond precision
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm looking for a class that is able to represent the time with the picosecond precision. I found the class numpy.datetime64 that can have this precision but the time span is only 212 days and I need at least 100 years. I could make my own class with a date that represent the year-month-day and an int for the picoseconds but, if available, I prefer to use something already done.
Thanks in advance for the help
curious what you will be using this for.
For a sar data simulator, the satellite orbit file contains dates saved as string with the picoseconds precision
I'd like to preserve this precision inside the class that represents the orbit
wouldn't it be possible to represent the time in years + months + picoseconds to get around the numpy.datetime64 limitation?
Yes, it's a possibility
I'm new to python and I don't know very well the python libraries, I asked because I thought maybe this kind of class already exists somewhere
you can find most libraries here: https://pypi.org/
Most if not all can be installed simply from command line with pip install package name
Please note the order by pull-down top right, if you highlight trending, you can find the most popular packages.