Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
None
Description
Please see below full problem 'thread'
Actually, if the date is being returned from the Git plugin as 1970-01-17T04:01:10+0000 +0300), parsing and reformatting won't work. I think you need to open a bug against the Git plugin.
slide
On Tue, Apr 8, 2014 at 5:37 AM, Nir Reuveny wrote:
Hi,
I hope someone can help with this…
We use custom jelly email template, and it used to work fine. (it works if I roll back the git-plugin to 2.0.1), the date is showing as below in the email (seems like wrong unix time conversion)
CHANGES
by XXX:1970-01-17T04:01:10+0000 +0300)
this is an example of an email when we roll back to git-plugin 2.0.1:
by XXX:2014-03-24 16:54:00 +0200)
this is the section in the jelly template we use:
<j:forEach var="cs" items="${changeSet}" varStatus="loop">
<j:set var="hadChanges" value="true" />
<j:set var="aUser" value="${cs.hudsonUser}"/>
<TR>
<TD colspan="2" class="bg2">${spc}by
<B>${aUser!=null?aUser.displayName:cs.author.displayName}: </B>
<B>(${cs.date})</B>
<B>${cs.msgAnnotated}</B>
</TD>
I opened a bug and got the below reply… can anyone help here? I’m really unsure exactly what to do… I’m not a developer…
Thanks!
——
Looks like the git plugin changed the date format they used. https://github.com/jenkinsci/git-plugin/commit/430bdc9b6ed121d653ef2633d2109b259aa8687b
added a comment - 08/Apr/14 11:40 AM
So what can we do to get the correct format using the email-ext plugin?...
added a comment - 08/Apr/14 11:42 AM
Since the getDate() method returns a string, you'd have to parse the string back into a date object and then format the date how you want. If you need additional help, please use the mailing list as this is not a bug.
–
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
–
Website: http://earl-of-code.com
–
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Attachments
Issue Links
- is related to
-
JENKINS-27097 wrong timezone reported in changes
-
- Closed
-
Mark,
I'm not sure that just "removing" the original timezone offset is the way to go. What I've done so far is here: https://github.com/alecharp/git-plugin/commit/c04174ee94e8e6765b1d2bdaea0beeb291678ab8
In the documentation here (https://www.kernel.org/pub/software/scm/git/docs/git-commit.html#_date_formats), the dates in seconds from EPOC may have a timezone offset, which is important. Just removing it shouldn't convert correctly the date. What do you think?