Does ArcServer know which time zone i am in?

2818
3
04-06-2011 04:07 PM
KevinGooss
Occasional Contributor
I create a feature in my application, Oracle adds a date time stamp like DateTime.Now() via C#.
I look at the date created inside of oracle and it looks fine.
I then query my data with the rest api and i get back an epoch value (incidentally, where is that documented by esri?). I convert that epoch value and I get a UTC value.
Or, I use the rest service test page and I get back the same UTC value.

So here is that catch. I create my feature at 10am Eastern Time. Oracle says it was created at 10:00:01 AM. But when esri returns it to me it says it is 2011/04/06 10:00:01 UTC.

Anyone see something wrong with that? Esri just assumed I was working in Greenwich England!
Why is the time returned in UTC? Why would they make that assumption?
Is there somewhere that I can tell the api what time zone i am in?

I am using api 2.1 with ags 10 sp1

Am i missing something? It could be something very simple, but i am confused
0 Kudos
3 Replies
DavidHollema
New Contributor III
I have the same question...have you heard/found out more regarding this issue?
0 Kudos
JasonWarzinik
Occasional Contributor
0 Kudos
DavidHollema
New Contributor III
I'm using the javascript api 2.6 with the out-of-the-box editor widget.  I verified that the attribute inspector converts the time to UTC properly.  For example, I'm in MST, GMT-7:00.  I created a point at 11:56 MST and populated a date/time field with the default calendar dijit.  Later, I identify that point and it shows properly 18:56 UTC.  I double-checked the feature in the query operation web page of the service endpoint and verified it's 18:56 UTC.  Our SDE instance is in SQL Server.

How are you creating that feature?  Through a javascript web app or something else?  Can you verify the epoch value of what's being sent to the server when creating?

I create a feature in my application, Oracle adds a date time stamp like DateTime.Now() via C#.
I look at the date created inside of oracle and it looks fine.
I then query my data with the rest api and i get back an epoch value (incidentally, where is that documented by esri?). I convert that epoch value and I get a UTC value.
Or, I use the rest service test page and I get back the same UTC value.

So here is that catch. I create my feature at 10am Eastern Time. Oracle says it was created at 10:00:01 AM. But when esri returns it to me it says it is 2011/04/06 10:00:01 UTC.

Anyone see something wrong with that? Esri just assumed I was working in Greenwich England!
Why is the time returned in UTC? Why would they make that assumption?
Is there somewhere that I can tell the api what time zone i am in?

I am using api 2.1 with ags 10 sp1

Am i missing something? It could be something very simple, but i am confused
0 Kudos