Repository navigation
fix(wallet): export tx history CSV timestamps as UTC (#1613) - #1615
Merged
theborakompanioni merged 1 commit intoNov 4, 2026
Merged
theborakompanioni merged 1 commit into
theborakompanioni merged 1 commit into
Conversation
theborakompanioni
approved these changes
Nov 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
The transaction history CSV wrote the raw timestamp from the API, which has no offset (e.g.
2026-10-31T13:10:05). Since #1543 these timestamps are treated as UTC: the table converts them to local time, and the Earn report CSV writes them withtoISOString(). In the tx history CSV nothing said it was UTC, so the time read as local time and didn't match the table (5.5 h off in Asia/Kolkata).txHistoryUtils.tsasparseHistoryTimestamp.TxHistoryTablenow imports it, so the table and the CSV use the same logic. No change to what the table displays.txHistoryToCsvwrites the parsed timestamp withtoISOString(), e.g.2026-10-31T13:10:05.000Z, like the Earn report CSV. Unparsable values are kept as they are.toISOString()has millisecond precision, so microseconds from the backend (.123456) become.123Z. The Earn report CSV has the same precision.Tested:
parseHistoryTimestamp(no offset, microseconds, explicitZ/+05:30, unparsable) and for the CSV timestamp column. The CSV test fails ondeveland passes with this change, in bothAmerica/New_YorkandAsia/Kolkata(the CI time zones).npm run test:unit(171 files, 1193 tests),tsc -b, ESLint and Prettier on the changed files.Asia/Kolkata): the table still shows31/10/2026, 6:40:05 pm, and the CSV now has2026-10-31T13:10:05.000Z, which is the same moment.Visual Demo
Image Demo :
Same transaction, table vs. downloaded CSV, before and after: