[Time Zone Service] Trouble with european and african timezones
Question
time-zone
Service icon
Forge component by Bool Labs

Hello

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

mvp_badge
MVP
Solution

Hi Angelo,

I did an example consuming the GetSystemTimeZones available in this component. Unfortunately, the identifier seems to be in a non-standard format. 

One option you have is trying to use the result of this action to populate your static entity.


See the ones I could get from there:



regards

Fabio

Hello Fábio

Yes I found out through another forum post that the method you mentioned gives us the list of identifiers and it solved my issue

I saw the method but I assumed it would just return the server's timezone or the timezone of the machine performing the call, and since it wouldn't help my purpose, I just didn't give it a second look


Thanks

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