简体   繁体   English

DataWeave 2.0中的夏令时日期

[英]Daylight savings in DataWeave 2.0 dates

is there a way to handle automatically daylight savings? 有没有办法自动处理夏令时? I'm using the following transformation 我正在使用以下转换

%dw 2.0
output application/json
---
{'date': now() >> "EST"}

but the output is 但输出是

{
  "date": "2019-08-08T06:45:16.663-05:00"
}

The timezone is -05:00 , but taking daylight saving into account I want it to be -04:00 时区是-05:00 ,但考虑到夏令时我希望它是-04:00

这样做的方法是使用相对(基于名称)的时区。

now() >> "America/New_York"

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM