93
Views
6
Comments
Solved
[Time Zone] Trouble with european and african timezones
Question
time-zone
Reactive icon
Forge asset by André Vieira

Hello

I am aware this is a different component, but I think it was developed by the same team and that it has some common basis, so I was wondering if you could help me out

I am using the Time Zone Service to get the UTC Offset of a given timezone. For that, I am calling the GetTimeZone method.

I created a static entity with the timezones that I need so I have the proper identifiers.

I am able to get the offsets for some of the timezones as shown below

However, when I try to replicate the result for GMT, European and African timezones, I get an error stating the identifier does not exist in the database. Note that I am using the identifiers in the same format as for the timezones that I do get results from. For example, for GMT I send the identifer as 'Greenwich Mean Time', for WET 'Western European Time' and for CAT 'Central African Time'

Can you help with this issue?


Thank you,

Ângelo

2021-09-06 15-09-53
Dorine Boudry
 
MVP
Solution

Hi,

as Justin is suggesting, there is an action available on that component 'GetSystemTimezones', giving a very extensive list, and yours are, at first sight, not in it.

maybe try the ones that are in that list ?

Dorine


PS to my surprise, i am living in the 'Romance Standard Time', go figure, never heard of that before.

2019-11-12 17-31-26
Justin James
 
MVP

Please provide a stack trace of the error message so we can see where the problem is occurring, which will let us help you solve it.

Thanks!

J.Ja

2018-11-12 10-02-08
Ângelo Sousa

Hello Justin

Thanks for replying on such short notice. Does this help?

Please note that it's returning an error saying the database does not have a timezone with ID = Central European Time. I got the same issue when looking for ID = Western European Time or ID = GMT, however, it works as expected when ID = India Standard Time, ID = Pacific Standard Time, etc, which leads me to believe this is just an issue with the correct ID I have to send.

I was able to return the results for the following IDs:

UTC, India Standard Time, Pacific Standard Time, Mountain Standard Time, Central Standard Time, Eastern Standard Time and Atlantic Standard Time


I wasn't able to return the results for the following IDs:

GMT, Western European Time, Central European Time, Western African Time, Middle European Time, Eastern European Time, Central African Time and Eastern African Time


Thank you,

Ângelo

2019-11-12 17-31-26
Justin James
 
MVP

Unfortunately, that's the stack trace from the client side, telling us what the client got... do we have the stack trace from the server side? This looks like the problem is that you are using identifiers different from what the server has. I don't know where you got your list of Timezone IDs, but the source system is usually the right place to do that. Timezone component should be able to give you a list of those IDs from the source system.

J.Ja

2018-11-12 10-02-08
Ângelo Sousa

Hello Justin

I got the Timezone IDs from here: https://www.ibm.com/docs/en/was/8.5.5?topic=ctzs-time-zone-ids-that-can-be-specified-usertimezone-property

The string that I'm using as an identifier is the one in the 'Display name' column. I got both the working and non-working IDs from there, so it doesn't make much sense to me that some of them work and others don't.

I agree with you about what seems to be causing the issue, but unfortunately, the Timezone component does not provide the list of supported IDs, or at least I wasn't able to find it

2021-09-06 15-09-53
Dorine Boudry
 
MVP
Solution

Hi,

as Justin is suggesting, there is an action available on that component 'GetSystemTimezones', giving a very extensive list, and yours are, at first sight, not in it.

maybe try the ones that are in that list ?

Dorine


PS to my surprise, i am living in the 'Romance Standard Time', go figure, never heard of that before.

2018-11-12 10-02-08
Ângelo Sousa

Hello Dorine

Thank you for your reply

I saw that action but I assumed if would retrieve the server time so I didn't give it a second look. 

This is very helpful, so now I just need to get all the timezones I need

Thank you so much

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.