4

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

Shoki
  • 1,508
  • 8
  • 13

1 Answers1

7

The way to do this is to use relative (name based) timezones.

now() >> "America/New_York"
machaval
  • 4,969
  • 14
  • 20