11-13-2017 10:47 PM
hi all,
i have been trying to get offset in a date format. i m using
toLocaleDateTimeString({“timeZone”:$dealerTimeZone, “format”:“yyyy-MM-dd'T'HH:mm:ss Z”})
since Z denotes offset, but its not showing offset in output ie -0800 or something like this.Please help
11-14-2017 10:50 AM
Z specifies the UTC or Zulu Time Zone (Zero hour offset). It will not be showing output like -0800 as mentioned.
11-14-2017 09:05 PM
so is there any workaround to get this??
11-15-2017 09:21 AM
the Z indicates there is no time offset from GMT. Where do you want an offset from?
11-15-2017 10:21 AM
I think vipulk10 is using the Z per the joda DateTimeFormat per the URL referenced in the SnapLogic Documentation for toLocaleDateTimeString - DateTimeFormat (Joda-Time 2.11.1 API). If the SnapLogic method utilized the joda formatting entirely, the Z would result in the offset value “-0800”. While ‘Z’ (in single quotes) would result in the string “Z” to represent GMT if desired.