WebService returning DateTime in diferent timezone

WebService returning DateTime in diferent timezone

Hi All,

Is it possible to return from a webservice, a datetime value in a diferent timezone from the application server?

Currently in Lisbon, the timezone is UTC/GMT offset, so by default, my application server will return in UTC format. Example, returning CurrDateTime() from a web method, it will return something like this:

My goal is for some cases, to return CurrDateTime() using Azores timezone, wich is UTC-1, so my web method would sometimes return:

Thanks in advance!

Best Regards,

Hi Rodrigo,

What do you mean by "for some cases"?
You want to return date with a different offset if the method is called from Azores? 

You can send the browser offset in the request and make the necessary tunning in the return datetime.

You can get the current offset in Javascript this way:
(new Date()).getTimezoneOffset()

Hi Hélio,

Thanks for you reply.

"for some cases" means that it depends from business logic, i will use a dummy CRM example:

1. A CRM web service / method, that reply data (with DateTime fields) from a customer;
2. The CRM system holds customers from diferent locations / countries;
3. The CRM web service / method should reply data, using the business logic:
3.1. If the customer is from Azores, the DateTime fields should be on UTC-1 timezone
3.2 If the customer is from Lisbon, the DateTime fields should be on UTC timezone
3.3 If the customer is from Barcelona, the DateTime fields should be on UTC+1 timezone

Best Regards,

Any ideas?


Off the top of my head, I would ask:

Do you have 2 front ends? Check the system date time on both
Kind regards,

Daniel Martins
Rodrigo -

I use the WorldTimezone extension to convert the dates which I store to the time zone that the customer is from. I have a table assigned to my customers that stores their time zone. I do not try to automatically detect it, but they can set their time zone in a profile and the system converts the dates for them.

Hi, Rodrigo!
I misunderstood, i tought that you were describing a bug or a unexpected behaviour. I missed the information of your 2nd post, If it's a feature that you want to implement, just go for Justin's solution.

You can find that component here.

Kind regards.