Frank Wein created AMBARI-23546:
-----------------------------------

             Summary: Oozie coordinator Workflow Manager web view sends date in 
wrong format to backend
                 Key: AMBARI-23546
                 URL: https://issues.apache.org/jira/browse/AMBARI-23546
             Project: Ambari
          Issue Type: Bug
          Components: ambari-views
            Reporter: Frank Wein


Note: I've originally discovered this in the latest HDP version 2.6.4, which 
uses Ambari 2.6.1 afaik.

When creating a coordinator job in the Workflow Manager, you can select a start 
and an end date. The problem is that the date is in the wrong format for the 
Oozie backend. When I click on a date/time in the calendar, it appears like 
this:

"04/10/2018 03:55 PM"

When submitting the coordinator job the following error appears in the log:
{code:java}
used by: java.lang.IllegalArgumentException: parameter [end] = [04/10/2018 
03:55 PM] must be Date in UTC format (yyyy-MM-dd'T'HH:mm'Z'). Parsing error 
java.text.ParseException: Could not parse [04/10/2018 03:55 PM] using 
[yyyy-MM-dd'T'HH:mm'Z'] mask
{code}
>From looking at the code it looks like the web interface uses the wrong date 
>mask? See here for the JS from the workflow manager: 
>[https://github.com/apache/ambari/blame/trunk/contrib/views/wfmanager/src/main/resources/ui/app/components/date-with-expr.js#L55]
{code:java}
format: 'MM/DD/YYYY hh:mm A',
{code}
The backend code checks against this date format: 
[https://github.com/apache/oozie/blame/4a05898518af353a36465805099c947918bf7d50/core/src/main/java/org/apache/oozie/util/DateUtils.java#L46]
{code:java}
public static final String ISO8601_UTC_MASK = "yyyy-MM-dd'T'HH:mm'Z'";
{code}
So the format does not match and thus the error.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to