Solved

ODATA PULLING DIFFERENT TIME?

  • 16 November 2022
  • 10 replies
  • 188 views

Userlevel 4
Badge

The data pulled is -3hours. Will appreciate any help here

icon

Best answer by BenjaminCrisman 29 November 2022, 22:13

View original

10 replies

Userlevel 7
Badge +11

Hi @development93 

The Odata directly fetches data from DB. I think your server time and instance Time Zone are different. Can you please verify?

FYI: 3hrs differences in EST and PST time zone.

 

 

Userlevel 4
Badge

Hi @development93 

The Odata directly fetches data from DB. I think your server time and instance Time Zone are different. Can you please verify?

FYI: 3hrs differences in EST and PST time zone.

 

 

Thank you for your response.

If I pull the data using POSTMAN I get the right results but if I pull using EXCEL get the above error.

What do you think about this?

Userlevel 7
Badge +11

@development93   Can you share the error message?

Userlevel 4
Badge

@development93   Can you share the error message?

The data pulled is still -3hrs using EXCEL

But the time for the data pulled using POSTMAN is correct.

Userlevel 7
Badge +11

@development93  Not sure of the exact reason for this issue. 

If the postman fetches proper data with time means, Excel also fetches the same data. 

I hope u r not added the date format on the excel sheet.

Userlevel 7
Badge +4

Hi @development93! This is just going to be a functionality difference between the programs. The “correct time” is always going to be the time stamp stored in the DB, which is UTC time or server time which is the time you are reporting to be the “error”.

If Postman is converting this to your local time, then it is a feature of Postman doing this and possibly something which Excel could do, I’m just not aware of such a setting.

Either way, the DB time is most accurate time stamp.

Hope this helps

Userlevel 4
Badge

I really appreciate for all the responses, they’re very helpful.

The current situation is as shown below. Few Hours later Data fetched through POSTMAN started to return the same time as EXCEL is returning, unware of what modification was triggered. Fetched data using the BROWSER, returned exactly what is in the Instance.

I really want to find a way EXCEL can return the exact time as is in the Instance.

Any solutions provided will be highly appreciated.

 

Userlevel 7
Badge +4

@development93 In this case you’ll need to modify the field in the GI to subtract the amount of hours needed or add the amount of hours needed to the time so it will reflect this on export

Userlevel 4
Badge

@development93 In this case you’ll need to modify the field in the GI to subtract the amount of hours needed or add the amount of hours needed to the time so it will reflect this on export

How exactly can it be done without affecting values of time to be displayed in the instance but reflect only on the export?

Userlevel 7
Badge +4

@development93 that would affect the instance also, there isn’t a way to have one time stamp in the site and a different one in the export, except where the system changes from local time to UTC when using an expression on a date field.

The options would be to either set the time so it shows your local time always (by adding/subtracting hours) and so this is the value which would export, or you can check the software being used for a setting to convert to local time zones, but I’m not aware of any such setting. Maybe @Gabriel Michaud would know the answer to this?

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved