Trying to convert CurrDateTime() to MST time zone.
I am using TimeZone Component which provides various function to handle time zones. I am using these sever actions under client action which are invoked on OnReady event of page. For me these actions are not working.
GetCurrentTimeZone is returning empty value also ConverFromUTC/ConvertToUTC is returning blank values.
I am passing CurrDateTime() and "Mountain Standard Time" as parameters to ConvertFromUTC method and it is returning blank value(#1900-1-1 00:00:00#), could you please help me using this component.
Can you try this answer of mine but instead of passing to CET, pass to Mountain Standard Time?
https://www.outsystems.com/forums/discussion/75682/convert-to-cet-time-zone/
Let me know if it works or if is just wrong :D
Kind Regards,
Marcio
I want the time in MST time zone and the api seems to be working fine with postman , but when i consume the same API with outsystems it is converting the time to UTC by default. check the datetime field for postman vs Outsystems API response
and further using GetTimeZoneDetail.TimeZoneDetail.Datetime in outsystems convert it to UTC, which is just showing me the system time and loosing the offset.
Response for MST:{
"abbreviation": "MST",
"client_ip": "34.208.156.20",
"datetime": "2022-06-30T10:29:09.471222-06:00",
"day_of_week": 4,
"day_of_year": 181,
"dst": false,
"dst_from": null,
"dst_offset": 0,
"dst_until": null,
"raw_offset": -25200,
"timezone": "MST",
"unixtime": 1656606549,
"utc_datetime": "2022-06-30T10:29:09.471222-06:00",
"utc_offset": "-07:00",
"week_number": 26
}
Response for MST7MDT (MDT):
{
"abbreviation": "MDT",
"datetime": "2022-06-30T10:29:56.403988-06:00",
"dst": true,
"dst_from": "2022-03-13T03:00:00-06:00",
"dst_offset": 3600,
"dst_until": "2022-11-06T01:00:00-07:00",
"timezone": "MST7MDT",
"unixtime": 1656606596,
"utc_datetime": "2022-06-30T10:29:56.403988-06:00",
"utc_offset": "-06:00",
consuming the api in outsystems give the same date time value for the MST & MDT timzones which actually have 1 hour difference
Can you share your oml?