Now that in the cloud it’s not possible to change the timezone of the webservices, we ran into a problem. We cannot seem to add any timezone to a datetime. Is that possible?
The proces:
The webservice gives the backend a date, we convert that into a datetime (by adding 000000T.) This datetime is now in UTC since the webservices’ timezone cannot be controlled in the cloud anymore, while we actually want it to be in a certain timezone. We have the timezone already (as in; we have the microsoft name for it because we get this from table 2000000164.) Now we only want to substract the offset so that the time is actually in UTC. We cannot seem to get the offset.
We are aware that we can make the conversion to UTC on the frontend and send a UTC datetime to the BC Cloud, but that is not what we want. We want the conversion to happen in BC.
Edit: we are also aware that we can get the display name from the Timezone table and by string manupulation get only the “(UTC+xxx)” part, but this doesn’t seem to be best practice since BC is able to implement timezones itself.
Any help is appreciated!