You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hop.apache.org by "fskorgen (via GitHub)" <gi...@apache.org> on 2026/09/02 06:24:43 UTC

[I] [Bug]: Timestamp parse mask reads HOP_DEFAULT_DATE_FORMAT (hop)

fskorgen opened a new issue, #8218:
URL: https://github.com/apache/hop/issues/8218

   ### Apache Hop version?
   
   2.19
   
   ### Java version?
   
   21
   
   ### Operating system
   
   Windows
   
   ### What happened?
   
   **Affected:** 2.19.0 and earlier. One-line fix.
   
   ```java
   public static final String DEFAULT_TIMESTAMP_PARSE_MASK =
       Const.NVL(
           EnvUtil.getSystemProperty(Const.HOP_DEFAULT_DATE_FORMAT),   // <-- date, not timestamp
           "yyyy/MM/dd HH:mm:ss.SSSSSSSSS");
   ```
   
   The default value is the timestamp pattern and the sibling `DEFAULT_TIMESTAMP_FORMAT_MASK` reads
   `HOP_DEFAULT_TIMESTAMP_FORMAT`, so the variable name is simply wrong here. Two consequences:
   
   - `HOP_DEFAULT_TIMESTAMP_FORMAT` has no effect on timestamp **parsing** at all.
   - Setting `HOP_DEFAULT_DATE_FORMAT` silently changes how timestamps are parsed, which is hard to
     find because the symptom shows up on a different data type than the variable names.
   
   ### Steps to reproduce
   
   1. Set `HOP_DEFAULT_DATE_FORMAT` to a date-only pattern, e.g. `dd-MM-yyyy`.
   2. Convert a String to Timestamp without an explicit format mask, for example in a Select values
      transform.
   
   **Expected:** the conversion uses `HOP_DEFAULT_TIMESTAMP_FORMAT`, or the built-in timestamp pattern
   when that variable is unset. `HOP_DEFAULT_DATE_FORMAT` affects Date only.
   **Actual:** the timestamp is parsed with the date pattern, and setting
   `HOP_DEFAULT_TIMESTAMP_FORMAT` changes nothing.
   
   ### Suggested fix
   
   Read `Const.HOP_DEFAULT_TIMESTAMP_FORMAT`.
   
   ### Issue Priority
   
   Priority: 2
   
   ### Issue Component
   
   Component: API


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@hop.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug]: Timestamp parse mask reads HOP_DEFAULT_DATE_FORMAT (hop)

Posted by "hansva (via GitHub)" <gi...@apache.org>.
hansva closed issue #8218: [Bug]: Timestamp parse mask reads HOP_DEFAULT_DATE_FORMAT
URL: https://github.com/apache/hop/issues/8218


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@hop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug]: Timestamp parse mask reads HOP_DEFAULT_DATE_FORMAT (hop)

Posted by "mattcasters (via GitHub)" <gi...@apache.org>.
mattcasters closed issue #8218: [Bug]: Timestamp parse mask reads HOP_DEFAULT_DATE_FORMAT
URL: https://github.com/apache/hop/issues/8218


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@hop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org