[英]How to change the timestamp to other time rather than utc time
I'm working on an iiot based monitoring solution and working with aws services.我正在研究基于 iiot 的监控解决方案并使用 aws 服务。 I'm batching the data received from iot core in this flow: -
我在这个流程中批处理从 iot 核心收到的数据:-
iot core -> rules (to firehose delivery stream) -> kinesis firehose (900 second buffer) -> s3 bucket
the s3 prefix is as follows:- s3 前缀如下:-
partitionKey={partitionKeyFromQuery:device_name}/year=:{timestamp:yyyy}/month=:{timestamp:MM}/day=!{timestamp:dd}/hour=!{timestamp:hh}
but the issue with this flow is it makes the folder structure in s3 bucket as follows: -但此流程的问题在于它使 s3 存储桶中的文件夹结构如下:-
partitionKey=wind-mill-01/year=2023/month=01/day=08/hour=08 (logs hour in utc time)
I want to log the time in ist format for the "hour" field is there any way possible to do it?我想以 ist 格式记录“小时”字段的时间,有什么办法可以做到吗?
Any help will be greatly appreciated.任何帮助将不胜感激。
Firehose only support UTC as mentioned in the documentation .如文档中所述,Firehose 仅支持 UTC。 If you want to have it in IST for some reason, you can have a lambda (or glue job) moving object into another path with the hour in IST.
如果你出于某种原因想把它放在 IST 中,你可以有一个 lambda(或粘合工作)将 object 移动到另一个路径中,并在 IST 中小时。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.