Method Community

 

Updating Date field problem

Last post 01-20-2009 6:30 PM by Method_Paul. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 01-20-2009 4:12 PM

    • Matt
    • Top 10 Contributor
    • Joined on 11-04-2008
    • Posts 877

    Updating Date field problem

     I tried updating a datetime field with the value "2009-01-20"   When I go to method to view the record it shows a value of "1/19/2009" it is always showing 1 day earlier than it should.


    Matt Raiser

    Founder,



    www.techinthefield.com

    matt@techinthefield.com

    219-221-9500



    ~ Method user / partner since 2008

    ~ Over 15 years field service experience

    ~ 2013 Method Partner of the Year

    ~ Degree in Computer Science





    Creator of:


        


  • 01-20-2009 6:30 PM In reply to

    Re: Updating Date field problem

    It's probably a UTC timing problem.  Since the data is on a web server which can be accessed and updated by web browsers from throughout the world, all times are stored on the Method server in UTC, which at this time of year is 5 hours ahead for someone in an Eastern time zone, and 6 hours ahead for someone in the Central time zone.

    So you enter 2009-01-20, and the server takes this as 2009-01-20 12:00 AM UTC.  When you view this in a browser, we detect your central time zone and display it 6 hours earlier, so 2009-01-19 6:00 PM.  So it is viewed as Jan 19th.

    What you need to do is pass over 2009-01-20 6:00 AM, so that it comes back to your browser as 2009-01-20. 

    Hope that makes sense.

Page 1 of 1 (2 items)