[ 
https://issues.apache.org/jira/browse/FLINK-36941?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17911716#comment-17911716
 ] 

Yiyu Tian edited comment on FLINK-36941 at 1/10/25 1:08 AM:
------------------------------------------------------------

Other functions that still use SimpleDateFormat are:

 
CONVERT_TZ
{{{}convertTz(String dateStr, String tzFrom, String tzTo){}}}, which eventually 
calls {{{}formatTimestampMillis(long ts, String format, TimeZone tz){}}}, 
[code|https://github.com/apache/flink/blob/5e5d0d5d2cd322ae53ad909dd075f978ca85ccd2/flink-table/flink-table-common/src/main/java/org/apache/flink/table/utils/DateTimeUtils.java#L729]]
 which uses {{{}SimpleDateFormat{}}}. 
 
 
UNIX_TIMESTAMP
{\{unixTimestamp(String dateStr, TimeZone tz) }}eventually calls calls 
{{{}internalParseTimestampMillis(String dateStr, String format, TimeZone 
tz){}}}, which uses {{{}SimpleDateFormat{}}}. 
[code|https://github.com/apache/flink/blob/5e5d0d5d2cd322ae53ad909dd075f978ca85ccd2/flink-table/flink-table-common/src/main/java/org/apache/flink/table/utils/DateTimeUtils.java#L960]]
 
{{unixTimestamp(String dateStr, String format, TimeZone tz)}} eventually calls
{{{}internalParseTimestampMillis(String dateStr, String format, TimeZone 
tz){}}}, same as above, which uses {{{}SimpleDateFormat{}}}. 
 
FROM_UNIXTIME
{{formatUnixTimestamp(long unixtime, TimeZone tz)}} eventually calls 
{{{}formatUnixTimestamp(long unixtime, String format, TimeZone tz){}}}, which 
uses {{{}SimpleDateFormat{}}}. 
[code|https://github.com/apache/flink/blob/5e5d0d5d2cd322ae53ad909dd075f978ca85ccd2/flink-table/flink-table-common/src/main/java/org/apache/flink/table/utils/DateTimeUtils.java#L1432]]
 
{{formatUnixTimestamp(long unixtime, String format, TimeZone tz)}} uses 
{{{}SimpleDateFormat{}}}, same as above. 
 
 

 


was (Author: JIRAUSER307116):
Other functions that still use SimpleDateFormat are:

 
*CONVERT_TZ*
{{{}convertTz(String dateStr, String tzFrom, String tzTo){}}}, which eventually 
calls {{{}formatTimestampMillis(long ts, String format, TimeZone tz){}}}, 
[[code|https://github.com/apache/flink/blob/5e5d0d5d2cd322ae53ad909dd075f978ca85ccd2/flink-table/flink-table-common/src/main/java/org/apache/flink/table/utils/DateTimeUtils.java#L729]]
 which uses {{{}SimpleDateFormat{}}}. 
 
 
*UNIX_TIMESTAMP*
{{unixTimestamp(String dateStr, TimeZone tz) }}eventually calls calls 
{{{}internalParseTimestampMillis(String dateStr, String format, TimeZone 
tz){}}}, which uses {{{}SimpleDateFormat{}}}. 
[[code|https://github.com/apache/flink/blob/5e5d0d5d2cd322ae53ad909dd075f978ca85ccd2/flink-table/flink-table-common/src/main/java/org/apache/flink/table/utils/DateTimeUtils.java#L960]]
 
{{unixTimestamp(String dateStr, String format, TimeZone tz)}} eventually calls
{{{}internalParseTimestampMillis(String dateStr, String format, TimeZone 
tz){}}}, same as above, which uses {{{}SimpleDateFormat{}}}. 
 
*FROM_UNIXTIME*
{{formatUnixTimestamp(long unixtime, TimeZone tz)}} eventually calls 
{{{}formatUnixTimestamp(long unixtime, String format, TimeZone tz){}}}, which 
uses {{{}SimpleDateFormat{}}}. 
[[code|https://github.com/apache/flink/blob/5e5d0d5d2cd322ae53ad909dd075f978ca85ccd2/flink-table/flink-table-common/src/main/java/org/apache/flink/table/utils/DateTimeUtils.java#L1432]]
 
{{formatUnixTimestamp(long unixtime, String format, TimeZone tz)}} uses 
{{{}SimpleDateFormat{}}}, same as above. 
 
 

 

> Fix Doc for DATE_FORMAT
> -----------------------
>
>                 Key: FLINK-36941
>                 URL: https://issues.apache.org/jira/browse/FLINK-36941
>             Project: Flink
>          Issue Type: Bug
>          Components: Documentation
>            Reporter: Yiyu Tian
>            Assignee: Yiyu Tian
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.19.2, 1.20.1
>
>
> The documentation for DATE_FORMAT is outdated. 
> https://github.com/apache/flink/blob/6951686be5691dc855b6d07d575535ac239670da/docs/data/sql_functions.yml#L645



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to