[ https://issues.apache.org/jira/browse/SCM-914?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17963600#comment-17963600 ]
ASF GitHub Bot commented on SCM-914: ------------------------------------ jira-importer commented on issue #1134: URL: https://github.com/apache/maven-scm/issues/1134#issuecomment-2964647592 **[Konrad Windszus](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=kwin)** commented This would be interesting in the context of DOXIASITETOOLS-329 as well. I think we should change the API in this case in a backwards compatible way (i.e. introduce a new getter method returning a `java.time.OffsetDateTime` and deprecate the old method returning a String). For example JGit exposes the date as int on https://git.eclipse.org/c/jgit/jgit.git/tree/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevCommit.java#n321 (not sure what it stands for). [Git log](https://git-scm.com/docs/git-log) can be used like this `git log -1 --format=%ct` to retrieve the unix epoch. The timezone can be adjusted in which to emit via https://git-scm.com/docs/git-log#Documentation/git-log.txt---dateltformatgt. > InfoItem.lastChangedDate is leaky abstraction > --------------------------------------------- > > Key: SCM-914 > URL: https://issues.apache.org/jira/browse/SCM-914 > Project: Maven SCM (Moved to GitHub Issues) > Issue Type: Bug > Components: maven-scm-api > Reporter: Tobias Gruetzmacher > Assignee: Konrad Windszus > Priority: Minor > Fix For: 2.1.0 > > > I was looking into implementing > [https://github.com/mojohaus/buildnumber-maven-plugin/pull/16] in a sane way, > but had to conclude that InfoItem.lastChangedDate is unfortunately just a > string and not a Data, so will leak the console output of different providers > to the user. > Does anybody see a sane way to fix this API and create a sane abstraction for > different SCMs? If yes, I would try to go ahead with the following tasks: > # Fix InfoItem, so that lastChangedDate is a Date > # Fix the current providers filling this field (svnexe and svnjava AFAICS - > aside: why is svnjava not part of the maven-scm repository?) > # Implement this feature for at least gitexe (and maybe jgit) so I can use > it for my usecase > Ideas, comments? -- This message was sent by Atlassian Jira (v8.20.10#820010)