Forum Discussion

vipulk10's avatar
vipulk10
New Contributor III
8 years ago

Get offset from a date

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

5 Replies

  • Z specifies the UTC or Zulu Time Zone (Zero hour offset). It will not be showing output like -0800 as mentioned.

    • vipulk10's avatar
      vipulk10
      New Contributor III

      so is there any workaround to get this??

      • cstewart's avatar
        cstewart
        Former Employee

        the Z indicates there is no time offset from GMT. Where do you want an offset from?