0

I am using Anypoint Studio 6.1 and Mule 3.8.1 and I want to set a variable with todays date and time e.g. Thu, 2 Mar 2017 22:00:28 GMT but the variable is set it is being set as Thu, 2 Mar 2017 22:00:28 UTC. How can I force it to show in GMT in the application as I cannot change server settings for this?

My MEL expression that does this is:

#[server.dateTime.format("EEE, d MMM yyyy HH:mm:ss z")]

Thanks

2 Answers 2

1

Here's the MEL you need on that scenario:

[server.dateTime.withTimeZone('GMT').format('EEE, d MMM yyyy HH:mm:ss z')]

1
1

This can be helpful just a forum blog post.If you are looking for MEL the above answer would be enough

https://support.mulesoft.com/s/article/ka434000000TOwlAAG/How-to-properly-set-the-TimeZone-in-Mule-Mule-Runtime-and-CloudHub

Not the answer you're looking for? Browse other questions tagged or ask your own question.