188
Views
3
Comments
DateTime conversion to Local time for Traditional Web
Application Type
Traditional Web

We're looking to migrate from Outsystems On Premise servers to Outsystems Cloud. One of the challenges is that we would have to convert the date time representation for all our apps in Traditional since it shows the server time. ( Our servers were not configured as UTC).
Is there any forge component which would handle the date time conversion from UTC to the client timezone (or a specified timezone) for all our traditional web apps without having to individually change or wrap around all the date time references in a function to convert them from UTC?

2022-02-25 19-42-59
Srinivas K Singadi

Hello Saiful Aseem Abdul Khader 

Yes, there are several forge components available in OutSystems that can help you with the date time conversion from UTC to the client timezone or a specified timezone. 

Here are some of them:

TimeZoneUtils: This forge component provides several functions to help you handle timezones. It includes functions to convert dates from one timezone to another, get the timezone offset for a specific date and timezone, and get the list of timezones.

TimeZoneConverter: This component converts the date and time values between different timezones. It also includes a function to get the timezone abbreviation for a specific timezone.

ClientTimeZone: This component provides a function that retrieves the client's timezone offset from UTC and converts a UTC date to the client's timezone.

DateTimeUtils: This component includes functions to parse, format, and manipulate dates and times. It also provides functions to convert dates between different timezones.

You can choose the component that best suits your needs and integrate it into your application to handle the date time conversion. 

UserImage.jpg
Craig Rodrigues

@srinivas aravala Hello Srinivas , could you please link the the forge components as I can't find them. 

2023-01-26 16-03-24
Ana Agostinho

Hello Craig Rodrigues,
 
Here are the links of the components above mention: 

Some are already available on Reactive. Choose the one that fits better your needs. You can see an example in yellow. 


Anyway, anytime you need a forge component, you can use the following link and just type the name of the search input field: 

Best regards,

Ana

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