Jigsaw Blog

22

Jul
2011
0 comments

Wrong Date and Time interpretation when using Dynamics NAV Web Services

The client Regional settings affect date and time interpretations within Dynamics NAV. The Region is easily set when using the Classic or Role Tailored Client (RTC). When using a Web Service its also easy, if you know how (like most things in life).

I have an application that takes Point-of-sale (POS) transactions from Advance Retail and passes them into Dynamics NAV. A problem arose where transactions for early one morning (say 6:00am 21st Jan 2011) where appearing in NAV with a Posting Date of the day before (20th Jan 2011). The problem was the client date time was based upon GMT +10 but the Web Service was working in UTC time.

The default Time Zone is UTC. -not very helpful when I live in Sydney Australia.

Settings within the client application making the Web Service call have no effect on the web service.

Within the CustomSettings.config file you'll find

 

In my case I want to use Australian Eastern Standard time.

Restart the web service and the Date and Time is now correctly interpreted.

Oh, and if you need the middle-tier (NST) to operate in different Time Zones, just run up another Web service. (see another post on how to do this)