Datetime and timezone not being changed in function

Datetime and timezone not being changed in function

Hi,

I have a datetime field that I'm storing in one of my custom modules. 

In a custom function, I take that datetime (called tourDate) and try to convert it a String in the US/Central timezone (looked like it comes into the function as a UTC datetime since it shows as 5 hours ahead of me after formatting) like below:

  1. tourDate = tourDate.toString("yyyy-MM-dd hh:mm:ss a z","America/Chicago");

I'm noticing two problems after doing that.
First, a tourDate that I schedule in my module as May 20, 2019 at 1pm CDT is still getting reflected as 2019-05-28 06:00:00 PM PDT  (so the 5 hour difference is still present), and second is that the timezone (z) says 'PDT' instead of 'CDT'. 

    Zoho Desk Resources

    • Desk Community Learning Series


    • Digest


    • Functions


    • Meetups


    • Kbase


    • Resources


    • Glossary


    • Desk Marketplace


    • MVP Corner


    • Word of the Day


      Zoho CRM Plus Resources

        Zoho Books Resources


          Zoho Subscriptions Resources

            Zoho Projects Resources


              Zoho Sprints Resources


                Zoho Orchestly Resources


                  Zoho Creator Resources


                    Zoho WorkDrive Resources



                      Zoho Campaigns Resources

                        Zoho CRM Resources

                        • CRM Community Learning Series

                          CRM Community Learning Series


                        • Tips

                          Tips

                        • Functions

                          Functions

                        • Meetups

                          Meetups

                        • Kbase

                          Kbase

                        • Resources

                          Resources

                        • Digest

                          Digest

                        • CRM Marketplace

                          CRM Marketplace

                        • MVP Corner

                          MVP Corner




                          Zoho Writer Writer

                          Get Started. Write Away!

                          Writer is a powerful online word processor, designed for collaborative work.

                            Zoho CRM コンテンツ




                              ご検討中の方