You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2022/07/16 15:17:00 UTC
[jira] [Work logged] (LANG-1638) commons-lang3-3.11 - Date
[ https://issues.apache.org/jira/browse/LANG-1638?focusedWorklogId=791661&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-791661 ]
ASF GitHub Bot logged work on LANG-1638:
----------------------------------------
Author: ASF GitHub Bot
Created on: 16/Jul/22 15:16
Start Date: 16/Jul/22 15:16
Worklog Time Spent: 10m
Work Description: greatmastermario opened a new pull request, #924:
URL: https://github.com/apache/commons-lang/pull/924
Added documentation indicating that DateFormatUtils does not support week year format YYYY like in java.util.Calendar, and it will default to yyyy current year format.
Issue Time Tracking
-------------------
Worklog Id: (was: 791661)
Remaining Estimate: 0h
Time Spent: 10m
> commons-lang3-3.11 - Date
> --------------------------
>
> Key: LANG-1638
> URL: https://issues.apache.org/jira/browse/LANG-1638
> Project: Commons Lang
> Issue Type: Bug
> Affects Versions: 3.11
> Environment: Production
> Reporter: Shailendra Soni
> Priority: Major
> Time Spent: 10m
> Remaining Estimate: 0h
>
> December 27th to 31st 2020 gets converted into 2021 while trying to use
> `DateFormatUtils.format` method.
> {code:java}
> import org.apache.commons.lang3.time.DateFormatUtils;
> import org.apache.commons.lang3.time.DateUtils;
> public class DateEx {
> public static void main(String... args) throws Exception{
> String startDateStr = "2020-12-31";
> String startDate = DateFormatUtils
> .format(DateUtils.parseDate(startDateStr, "YYYY-MM-dd"), "YYYY-MM-dd-HH.MM.SS.mmmmmm");
> System.out.println("startDate with Timestamp - " + startDate);
> }
> }
> {code}
>
> Actual Output - 2021-12-31-00.12.00.000000
> Expected Output - 2020-12-31-00.12.00.000000
>
> Can someone look into it.
>
> Version :-
> # Java -> 1.8.0_212-b10
> # Common-lang3 -> 3.11
>
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)