Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    default timezone question

    Hi,

    I'm trying to display a default timezone with some datetime fields. In trying to follow the steps from the documentation, I did the following:

    isc.Time.setDefaultDisplayTimezone("-05:00");

    I am trying to default the timezone to US East Coast time.

    Then, the docs say:
    "If a custom timezone is specified, it will be respected by all TimeDisplayFormats, and by the standard short DateDisplayFormats when formatting dates representing datetime type values. However native JavaScript Date formatters, including toLocaleString() will not respect the specified timezone. Developers specifying a custom timezone may therefore wish to modify the Date.setNormalDisplayFormat() to avoid using a native JS Date formatter function. "

    So, when I use the following formatter, i would expect the timezone to display but it doesn't?

    value.toUSShortDatetime();


    What am I doing wrong?

    #2
    What version does this relate to, and in what browser?

    Comment


      #3
      Does that imply that what I tried should be working?

      We are using version 8.1.8.27.11 and I was trying it on Firefox 7.

      Comment


        #4
        With the simplest possible test code we seem to getting the right result:

        Code:
        isc.Time.setDefaultDisplayTimezone("-05:00");
        isc.logWarn(new Date().toUSShortDatetime());
        This logs "11/07/2011 20:12" since it's 5:12 PM PST and GMT-5 is three hours ahead.

        Comment


          #5
          Hi, I want the actual timezone to display so it would look like this:

          11/07/2011 20:12 EST


          Is that possible?

          Comment


            #6
            That's not something the built-in date and datetime formatters are intended to do, but you could add it via component-level formatters or overriding the default date and datetime formatters.

            Comment

            Working...
            X