What timezone is the "created at" field in a submission returned by the API?

  • Profile Image
    Michael 
    Asked on August 19, 2015 at 09:36 PM

    When viewing submissions via the Jotform website my correct timezone is shown for the "Submission Date". When retrieving submissions via the API the "created at" field is in a different timezone. Can someone let me know what timezone it is so I can covert.

     

    Thanks!

  • Profile Image
    EltonCris
    Answered on August 20, 2015 at 01:48 AM

    Hello Michael,

    It's most likely base on the server time zone but while I am not quite certain, I have forwarded this to our developers so we can get accurate answer. You will receive a direct update from them once they see this.

    Regards!

  • Profile Image
    EltonCris
    Answered on August 20, 2015 at 01:58 AM

    So I made several tests figuring this out and the result shows the time base on my time zone (the time set in my accounts page). I created a form report and here's what it shows.

    You can also run a test here http://api.jotform.com/docs/#user-reports.

    Thanks!

  • Profile Image
    Endlessspas
    Answered on August 20, 2015 at 02:33 AM

    Thanks for doing the testing. Perhaps you are in the same timezone as the server. When i retrieve a form submission via the API I get:

    "created_at": "2015-08-19 21:43:38",

    Then when I view the same submission via the website in the submissions list the "Submission Date" is 2015-08-20 11:43:38 which is correct for my Timezone setting. For the moment I am presuming the "created_at" is UTC-5 but it would be great to know what it actually is so I know I am converting it correctly.

  • Profile Image
    Charlie
    Answered on August 20, 2015 at 03:28 AM

    Hi,

    I also tested it in my end, here's my sample script to get the submission.

     

    This is the API output.

    The submission outputs the time shown in my submissions page

     

    I'm on +8 GMT, but I reset the timezone in my account settings just to make sure. Both the submissions page and the API output shows the same created_at. In submissions page its "15:03:31", its in the 24hour format but its the same with the "03:03:31".

     

    You can also check if your API settings is manually set to a specific timezone. I used a direct call to get the submissions so that time zone is referenced to the submission itself. The time zone of the server is different from ours. I believe the server is on EST although I'm not sure of it. 

     

    I hope that helps.

  • Profile Image
    Endlessspas
    Answered on August 20, 2015 at 03:34 AM

    Thanks Charlie. They are definitely different timezones if you look at my data in the previous message. I think EST and UTC+8 are currently 12 hours difference which is why you are seeing 03 and 15. I have it set to convert the created_at from EST so I think it should be fine.

    Thanks again.

  • Profile Image
    Charlie
    Answered on August 20, 2015 at 03:46 AM

    Hi again,

    I might have been confused with the current time I have, on my clock, it was 3:03:31 PM, I missed the "PM" part and assume its on the 12 hour format, "03:03:31" which is actually 3 AM on EST. It does look like it follows the server time on EST. But let me discussed it with my colleague to further check. Apologies for the confusion, but thanks for pointing it out.

  • Profile Image
    Tikido
    Answered on October 24, 2016 at 09:11 AM

    hey JotFormers!

    Please make it UTC, or explicitly add the TZ info.

  • Profile Image
    Charlie
    Answered on October 24, 2016 at 10:38 AM

    @Tikido

    I have opened a separate thread for your concern for us to better assist you, please refer to this link instead: https://www.jotform.com/answers/969690. I will address it shortly. 

    Thank you.

  • Profile Image
    primelabs
    Answered on April 25, 2017 at 11:30 PM

    Hi,

    Can you please confirm the timezone of the API?

    The result from the API does not use the account's timezone settings. As a test, I set the account timezone to Amsterdam GMT+1 and here is the result:

    From API, "created_at": "2017-04-25 22:58:56"

    From website, submission date: 2017-04-26 04:58:56

  • Profile Image
    Charlie
    Answered on April 26, 2017 at 02:26 AM

    @primelabs

    To better assist you, I've opened a separate thread for your concern. Please refer to this link instead: https://www.jotform.com/answers/1128807. We will address it accordingly. 

    Thank you.