23
Views
4
Comments
UTC time being displayed in an application
Question

Hi

I have an application which consists of a front end form and a content management admin system,  It's used for booking appointments.

The form correctly displays the time e.g. 18.24 BST/GMT
I think the time is save as UTC in the DB 17.24 UTC

When the CMS displays the time it dislpays the 17.24 UTC time.

Can someone point me to the most straight forward solution to display the correct time in the CMS.

The CMS is only used in the UK so I don't care about other timezones.

Any help appreciated.

Thanks,

John


2019-01-07 16-04-16
Siya
 
MVP

@JayPea : OutSystems stores date/time values in UTC by default. On the UI they’re rendered according to the user’s timezone, which is why the form shows the correct local time. How are you rendering the date/time in the CMS? Maybe you could share a bit more context.

2022-09-04 15-01-10
JayPea

Hi,


Yes it's displaying UTC but I need to adjust it for BST British Summer Time.

Thanks


2019-01-07 16-04-16
Siya
 
MVP

Could you please show what control are you using in CMS ? Or if you have sample OML to share please do so.

2025-08-07 06-30-56
Amit J
Champion

The most straightforward solution in OutSystems is:

Use the AddHours function (for example, AddHours(CretedDateTime, 1)) to adjust for GMT+1 during BST, 

or

Better, use the built-in function TimeZone_ConvertFromUTC  to convert UTC to the current server time zone or a specific UK time zone.

For summer/winter changes, using the TimeZone functions is safer because they automatically handle daylight saving.

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