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 <[email protected]> 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 [email protected]. > 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 [email protected]. For more options, visit https://groups.google.com/d/optout.
