admin管理员组文章数量:1122846
The source csv file is:
"date_time"
"2024-07-30 19:59:04"
The timezone in fact is GMT+3
I use UpdateRecord with following properties:
Replacement Value Strategy -> Literal Value
/new_dt -> ${date_time.value:toDate():toNumber():minus(3600).format("yyyy-MM-dd HH:mm:ss", "GMT")}
Expected output is:
"new_dt"
"2024-07-30 16:59:04"
but nothing is changed:
"new_dt"
"2024-07-30 19:59:04"
The source csv file is:
"date_time"
"2024-07-30 19:59:04"
The timezone in fact is GMT+3
I use UpdateRecord with following properties:
Replacement Value Strategy -> Literal Value
/new_dt -> ${date_time.value:toDate():toNumber():minus(3600).format("yyyy-MM-dd HH:mm:ss", "GMT")}
Expected output is:
"new_dt"
"2024-07-30 16:59:04"
but nothing is changed:
"new_dt"
"2024-07-30 19:59:04"
Share
Improve this question
edited Nov 25, 2024 at 21:12
Barbaros Özhan
64.8k11 gold badges35 silver badges61 bronze badges
asked Nov 22, 2024 at 14:51
JellyJelly
1,2963 gold badges25 silver badges58 bronze badges
1 Answer
Reset to default 1Use an UpdateRecord
:
Replacement Value Strategy
:Record Path Value
/new_dt
:format( toDate( /date_time, "yyyy-MM-dd HH:mm:ss", "GMT+3:00"), "yyyy-MM-dd HH:mm:ss", "GMT")
input
"date_time"
"2024-07-30 19:59:04"
output
date_time;new_dt
2024-07-30 19:59:04;2024-07-30 16:59:04
本文标签: Apache Nifi update timezone in RecordStack Overflow
版权声明:本文标题:Apache Nifi: update timezone in Record - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736303015a1931738.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论