I have a question about the current time issue in our Mule App, which is deployed on any point platform. When using 'now()' in mule app, it consistently returns a time that is one hour different as Europe/Berlin time as I expected. Therefore, I made a change to explicitly request the time in the Europe/Berlin timezone. See below
var formattedCurrentTime= now() as String { format: "yyyy-MM-dd'T'HH:mm:ss", timezone: "Europe/Berlin" }
But it still return same result , Do you have any idea about it? PS: The problem is only on deployed Mule App at anypoint platform. With local system or on https://dataweave.mulesoft.com/learn/dataweave It works correctly
Any hints or ideas? thank you all (dear mule riders) in advance!
Mule applications deployed on CloudHub always use UTC as the timezone. Berlin timezone is UTC+1, which probably explains the difference. What you should do is to change the timezone of the date time returned by
now()before formatting it to a string.Example
Output:
For more information read: https://docs.mulesoft.com/dataweave/latest/dataweave-cookbook-change-time-zone