Help get this topic noticed by sharing it on Twitter, Facebook, or email.

Video: Universal Time and Local Time Zones

Watch new video about universal time and local time zones:
https://www.youtube.com/watch?v=DLjjL...

Learn to enable "Local Time" mode to present universal date and time values stored in the database as "local" to the end users. Universal date/time values retrieved from the server are rendered in local time zone on the client. Changed values are converted to universal time before submission to the server for processing.
Reply
  • Hi,

    Using the method described in this great video works well, except in one instance, that is unique to time zones outside the USA.

    When EASE auditing is used as per this image...



    Adding the code to the JSON file as suggested ensures that the Created and Updated dates are indeed entered on the server in local time. But when reading the date back again it has been converted back to 18 hours earlier (the time zone difference between UTC and Brisbane Australia).

    Cheers,
    Jonesy
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated kidding, amused, unsure, silly happy, confident, thankful, excited indifferent, undecided, unconcerned

  • I'm adding this to my post above with an absolute appreciation for the efforts by COT to streamline the application.

    I've tested the code suggested in the video in 3 scenarios. The 3 scenarios are how I personally utilise dates in my apps.

    They are;

    1) Entering a date directly into an edit or create form, either via the date picker or keyboard entry

    2) Getting UpdatedOn and CreatedOn dates from the EASE auditing function in settings.

    3) By updating a field using the GETDATE() function in a business rule.

    This is what happens when I do NOT use the code in the video;

    Scenario 1: The date returned is correct (in local time).
    Scenario 2: The date returned is 18 hours behind.
    Scenario 3: The date returned is 18 hours behind.

    This is what happens when I DO use the code in the video;

    Scenario 1: The date returned is 18 hours behind.
    Scenario 2: The date returned is correct (in local time).
    Scenario 3: The date returned is correct (in local time).

    In addition, there is a problem with entering the date manually into a field (not using the date picker).
    If I have the date picker enabled but choose to enter the date manually the format changes. See the GIF in the link below...

    https://www.dropbox.com/s/cq49hzc6znf...
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated kidding, amused, unsure, silly happy, confident, thankful, excited indifferent, undecided, unconcerned

  • I’m thankful
    I found that some times having the snippet of code is important to enabling this feature.

    I was pulling my hair out trying to figure out what it was not working for me and it comes down to Case Sensitivity


    {
    "dates": {
    "localTime": {
    "enabled": true
    }
    }
    }

    Please Note that the localTime has a capital "T" where I had used a lower case "t" when I tried to transpose the info from the video

    COT Team needs to make sure that documentation is available for the features they release in videos so people have access to it...
    • view 2 more comments
    • How does the local time break the date formatting?

      v9 is coming soon. We are refreshing our roadmap and will make a few announcements very soon.
    • I put "d" with out the quotation and with the quotation in the Data Formatting Field in my controller fro one of my date fields and compile the system and navigate to the page and the page hangs at Loading...

      I have tried with different formatting strings with the same results.

      as I only want to see the Month Day and Year and not the Time or Timezone in my grid view
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated kidding, amused, unsure, silly happy, confident, thankful, excited indifferent, undecided, unconcerned