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 happy, confident, thankful, excited kidding, amused, unsure, silly 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 happy, confident, thankful, excited kidding, amused, unsure, silly indifferent, undecided, unconcerned