isce-framework / isce-framework/isce3

ISCE3 DateTime objects cannot parse strings that specify UTC via "Z" ending

Open Beginner friendly
#255 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
239
Forks
90
Avg merge
13d 1h
Merged PRs (30d)
5

Description

Attempting to run a job, I encountered an error when attempting to parse a string:

ValueError: Error in file /src/cxx/isce3/core/DateTime.cpp, line 413, function void isce3::core::DateTime::strptime(std::string): ISO-8601 incompatible or bad value for datetime string!

The offending string was a UTC datetime that was in the following style:
'2026-01-01T00:00:00.000000Z'

Discussing this with @bhawkins, he pointed out that of the following three statements, only the third succeeds:

from isce3.core import DateTime
DateTime('2026-01-01T00:00:00.000000Z')
DateTime('2026-01-01T00:00:00.00Z')
DateTime('2026-01-01T00:00:00.000000')

He also pointed out that isce3 uses sscanf under the hood for parsing strings to DateTime objects.

The evidence points to isce3.core.DateTime objects being unable to parse datetimes that end with "Z", which may be confusing to users.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in src/cxx/isce3/core/DateTime.cpp at the strptime implementation around line 413, and reproduce the three DateTime constructor examples from the issue. Check the existing parsing behavior for fractional seconds and a trailing Z; done means UTC strings ending in Z parse successfully without breaking the formats that already work.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, python
Domain
backend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.