1

I am trying to use:

    <layout class="PatternLayout">
        <param name="ConversionPattern" value="%d{MM/dd/yy-HH:mm:ss}-t@%t-Inf-%m%n" />
    </layout>

but I am still getting a full 4 digit year. Is anybody familiar with getting 2 digit dates?

Thanks

Palace Chan
  • 8,845
  • 11
  • 41
  • 93

1 Answers1

0

No luck here. It seems this part was hastily translated from Java's SimpleDateFormat so that it only handles 0-padding and never truncates the number:

NumericToken::format() {
// ...
  if ( initialLength + width > finalLength )
  {
    s.insert( initialLength, ( initialLength + width ) - finalLength, (logchar) 0x30 /* '0' */);
  }
}
MaDa
  • 10,511
  • 9
  • 46
  • 84